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

Thread: SEO Friendly Error Page (404)

  1. #1
    WebEvader's Avatar
    WebEvader is offline Moderator
    Join Date
    Jan 2009
    Posts
    397
    Blog Entries
    2
    Thanks
    166
    Thanked 26 Times in 21 Posts

    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
    Andy101's Avatar
    Andy101 is offline Code Otaku
    Join Date
    Aug 2009
    Location
    Kanazawa
    Posts
    1,252
    Thanks
    173
    Thanked 303 Times in 230 Posts
    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
    UncleP's Avatar
    UncleP is offline The perfect face for radio
    Join Date
    Nov 2009
    Location
    Blighty
    Posts
    218
    Thanks
    20
    Thanked 91 Times in 61 Posts
    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. #4
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    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
    Mikepin is offline Unknown Net Builder
    Join Date
    Aug 2011
    Location
    Bristol
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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. #6
    bhartzer is offline Net Builder
    Join Date
    Dec 2008
    Posts
    502
    Thanks
    53
    Thanked 135 Times in 101 Posts
    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. Thanked by:

    Will.Spencer (28 August, 2011)

  8. #7
    WebEvader's Avatar
    WebEvader is offline Moderator
    Join Date
    Jan 2009
    Posts
    397
    Blog Entries
    2
    Thanks
    166
    Thanked 26 Times in 21 Posts
    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?

  9. #8
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    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.

  10. #9
    UncleP's Avatar
    UncleP is offline The perfect face for radio
    Join Date
    Nov 2009
    Location
    Blighty
    Posts
    218
    Thanks
    20
    Thanked 91 Times in 61 Posts
    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...

  11. #10
    canadaimmigration is offline Newbie Net Builder
    Join Date
    Dec 2011
    Location
    Canada
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
  •