Forum Moderators: phranque

Message Too Old, No Replies

.htaccess vs seo

does it make a difference

         

ElvisFan

2:02 am on Apr 5, 2010 (gmt 0)

10+ Year Member



Had my host server add a 404 htaccess code across all my sites to lead to my homepage as I was getting a lot of 404 errors.

Will this code have an impact of my ranking with google and/or across other search engines?

jdMorgan

2:24 am on Apr 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, it will. All of those "wrong URLs" now represent duplicates of your home page, so you are competing with yourself!

If the 404 URLs are totally bogus, let them 404.

If they represent pages which you have intentionally removed, then those URLs should return 410-Gone status instead.

If they represent pages which have been replaced (or removed pages for which another page might make a reasonable/relevant replacement), then you should return a 301-Moved Permanently redirect, providing the new replacement URL.

Take a look at the HTTP/1.1 protocol specification, especially the server response section. Being familiar with "how it is supposed to work" may prevent future "suicidal" mistakes...

Jim

ElvisFan

2:50 am on Apr 5, 2010 (gmt 0)

10+ Year Member



Most 404 are from other sites linked to my site pages that include misspelt urls... as I do make sure that all my pages are live and none of these represent pages which I have intentionally removed.

As I don't have a clue as to how to set this up I had my host server do it for me... but can access this file in my logs in plesk...

So the question is... can I just replace the information in the htaccess file with something more exceptable.. and if so what... thanks

g1smd

7:07 am on Apr 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Set up a custom 404 page that includes a message explaining why the page wasn't found, links to the home page and to your major section indexes, and links to popular pages or topics, then

ErrorDocument 404 /the.error.page.name.html


goes in the .htaccess file.

ElvisFan

8:00 am on Apr 5, 2010 (gmt 0)

10+ Year Member



thanks... so what are you saying set up a page such as
http://www.example.com/404error.html

and then the info goes something like

ErrorDocument404/http://www.example.com/404error.html

is that correct?

[edited by: jdMorgan at 12:58 pm (utc) on Apr 5, 2010]
[edit reason] example.com [/edit]

g1smd

8:12 am on Apr 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No.

ErrorDocument 404 /404error.html


If you add a domain name to this directive it will send "302 Found".

Do not add a domain name. It must return "404 Not Found".

jdMorgan

1:04 pm on Apr 5, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And again, URLs for which a relevant replacement exist --such as miss-spelled URLs-- should be 301-redirected to the correct URLs. If there are too many of these to redirect individually, and they cannot be redirected in groups (say by removing spurious punctuation appearing at the end), then identify the most-important 50 or 100 of them --the ones that get the most traffic and/or are most important for ranking-- and 301-redirect those.

It's time to 'dig in' to your Web site's server, and get up to speed on redirection and error handling. You can only go on for so long avoiding this if you want a correctly-operating site. And since good ranking in search depends on correct site operation, this is not something to put off indefinitely... You can only go so far using a control panel, as it is by its nature a 'general' and therefore limited tool.

Jim