• Resolved robertallen

    (@robertallen)


    I noticed the default template has the 404.php inside of it. I heard that it’s best and more SEO friendly to have the 404 file in the root directory. Is this true? If so, does anyone know a good plugin that will do this?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter robertallen

    (@robertallen)

    Thank you for the reply. It didn’t specifically tell me if it was best to put it in the root directory. By best, I mean SEO friendly.

    Do you happen to know? I already wound up creating my own 404.php…just wasn’t sure to keep it in the theme folder or program it to the root directory.

    It didn’t specifically tell me if it was best to put it in the root directory.

    All theme template files are added to your theme’s template folder inside wp-content/themes.

    Thank you for the reply. It didn’t specifically tell me if it was best to put it in the root directory. By best, I mean SEO friendly.

    I’ve never heard of this being better for SEO.
    SEO is based on content. Focus on good content and the seo will follow.

    The important thing is that the correct headers are sent so that Google knows that the page is missing. That’s what the example in the page I linked to above does.

    I’m trying to create an Error 404 Page with Easel theme.
    I think I have tried everything now buy cannot get it to work.
    https://speedingticketfixer.com/page/5/
    Can anybody help me with this?

    Thread Starter robertallen

    (@robertallen)

    Have you tried copying the page.php theme in your theme folder and make it 404.php?

    Inside the file there’s an area that says something like:
    <?php the_content('Read more...'); ?>

    Replace it with a 404 Error message.

    worth a try, will get back to you, thanks

    yes there is already a 404.php in the Easel Theme folder

    Thread Starter robertallen

    (@robertallen)

    Try this…

    To ensure the server finds your 404 page, add the following line to your .htaccess file:

    ErrorDocument 404 /index.php?error=404

    Where would I put this line?
    ErrorDocument 404 /index.php?error=404

    This is what I see below:

    ----------------------------------------------------------------
    # -FrontPage-
    DirectoryIndex index.php index.html index.htm
    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
    
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName speedingticketfixer.com
    AuthUserFile /home/speepcqf/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/speepcqf/public_html/_vti_pvt/service.grp
    
    DirectoryIndex index.php index.html index.htm
    #Redirect 301 /index.html https://speedingticketfixer.com/index.php
    
    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
        <IfModule mod_headers.c>
            Header append Vary User-Agent env=!dont-vary
        </IfModule>
            AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
        <IfModule mod_mime.c>
            # DEFLATE by extension
            AddOutputFilter DEFLATE js css htm html xml
        </IfModule>
    </IfModule>
    <FilesMatch "\.(css|htc|js|js2|js3|js4|CSS|HTC|JS|JS2|JS3|JS4)$">
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.10"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|
    SVGZ|TXT|XSD|XSL|XML)$">
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.10"
        </IfModule>
    </FilesMatch>
    <FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|
    gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v
    |mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot
    |pps|
    ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|
    xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EOT
    |EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|JSON|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP
    4|M4V|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|PO
    T|PPS|PPT|PPTX|RA|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|X
    LA|XLS|XLSX|XLT|XLW|ZIP)$">
        <IfModule mod_headers.c>
             Header set X-Powered-By "W3 Total Cache/0.9.2.10"
        </IfModule>
    </FilesMatch>
    # END W3TC Browser Cache
    # BEGIN WordPress
    
    # END WordPress
    -----------------------------------------

    Thread Starter robertallen

    (@robertallen)

    You can essentially put it anywhere, but try putting it between BEGIN and END WordPress. I’m no .htaccess expert, but I think that might work.

    Yes it WORKED. Than you very very much.
    Regards
    Les

    Thread Starter robertallen

    (@robertallen)

    Woo hoo! Glad I could help and that it worked. You’re most welcome.

    @robertallen, can you mark this thread as resolved?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘404 Page’ is closed to new replies.