Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: SEO Friendly Error Page (404)

Hybrid View

  1. Red face SEO Friendly Error Page (404)

    Hi,

    What is the best way of making a SEO friendly error page ? I have been getting a lot of incoming links to my site creating lots of crawl errors with the google bot... Should the error page redirect or not ? How should I edit the .htaccess page ?

    Any help will be appreciated
    Last edited by WebEvader; 24 August, 2011 at 09:30 AM.

  2. #2
    I think what you need is a .htaccess rule to detect a pattern for these non-existent pages and then redirect to a PHP script that can include the keyword on a generic page so that it's not flagged as 404.

    WordPress for example redirects any pages or directories that don't exist to index.php with this code:
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

  3. #3
    You could put ErrorDocument 404 http://domain.tld/index.php at the top of your .htaccess file, that'll redirect all 404 errors to the home page (obviously change domain.tld) or you could have <link rel="canonical" href="http://domain.tld/index.php"> in the page header, then anything crawled will only index the home page (or whatever page you select), it's very seo friendly (apparently).
    If I can't be a good example, I'll just have to be a terrible warning...

  4. What CMS are you using?
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  5. #5
    Join Date
    Aug 2011
    Location
    Bristol
    Posts
    8
    Some good answers above this post, but one thing I feel I find myself wanting to know STRAIGHT away...

    With multiple links coming in to 404's, have you tried to track WHY this is happening?

    If you use a CMS (wordpress, etc), have you updated your permalinks? (if so, look into plugins, like 'deans permalink migration', which will 301 redirect the old URLs to the new ones).

    sorting a friendly 404 page is a start, but I would think that if you have multiple links coming in to 404 errors on your site, that's a whole lot of wasted link juice (yer, I know, a 301 could pass that on, but fixing the real issue, as well as sorting a 404 page, is probably best).

    Like suggested above, a htaccess file could be used to 301 404's to a valid file/page on your site, but I really would see why all this is happening!

    If you are using a CMS like wordpress, post here so we can all chip in and try to help



    Quote Originally Posted by WebEvader View Post
    Hi,

    What is the best way of making a SEO friendly error page ? I have been getting a lot of incoming links to my site creating lots of crawl errors with the google bot... Should the error page redirect or not ? How should I edit the .htaccess page ?

    Any help will be appreciated

  6. getting a lot of incoming links
    Depending on the URL, it might make sense to actually create pages on those URLs with content...so that those are not errors. If the URL has links, you're going to have more benefit from them if you have real content on the page (page is a 200 OK) rather than a 404 error or even 301 redirecting them to other URLs on the site.

    One of my favorite things to to is get a domain at auction...and then watch the 404 errors for traffic and create pages on those old URLs.
    Need links? Try AuthorLinks where you can buy or sell links based on Authorship and Klout score. Check out my blog or like me on Facebook.

  7. Its on a standard site, so no CMS (Wordpress etc...) I think the best thing would be just to redirect the traffic back to the homepage...

    I have been looking around and apparently the best thing to do is create a 404 error page with a javascript redirection back to the homepage. Are there any better techniques?

  8. Quote Originally Posted by WebEvader View Post
    Its on a standard site, so no CMS (Wordpress etc...) I think the best thing would be just to redirect the traffic back to the homepage...

    I have been looking around and apparently the best thing to do is create a 404 error page with a javascript redirection back to the homepage. Are there any better techniques?
    You could just use Apache's ErrorDocument directive?
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  9. #9
    So have:
    Code:
    ErrorDocument 404 http://domain.tld/404.php
    in the .htaccess and a 404.php page that contains:
    Code:
    <?php
    header('Location:http://www.domain.tld/);
    ?>
    But the "ErrorDocument 404 http://domain.tld/" in .htaccess does exactly the same thing
    If I can't be a good example, I'll just have to be a terrible warning...

  10. #10
    Before you implement 404 page and redirect it to home/index page, better find out why it is working like hell. Let the bots crawls the page they want. Even if you can't solve this, then go for redirection.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •