Welcome Guest!
Please login
If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:
- Receive Fast Advice
- Learn Programming Languages
- Get Professional Website Reviews
- Quick Troubleshooting Assistance
|
|
301s On 404s
This is a discussion on 301s On 404s, within the Search Engine Optimization (SEO) section. This forum and the thread "301s On 404s" are both part of the Managing Your Website category.
![]() ![]() |
Jul 22 2008, 04:24 PM
Post
#1
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Posts: 206 Joined: 15-February 08 From: Plymouth |
We've been advised by one company to put 301 redirects to our home page on our customised 404 pages. Is this okay, or will it cause problems? If it is okay to do, then is this the correct code?
CODE Redirect 301 /error404.html http://www.ourdomain.com/ thanks in advance. -------------------- QUOTE I'm challenged enough without any extra weirdness in my life! |
|
|
Jul 22 2008, 04:32 PM
Post
#2
|
|
|
Master of the Universe ![]() Posts: 1,298 Joined: 15-February 08 From: London, England |
Why would you want to do this? If a user cannot find what they are looking for they should be told that the article can not be located. You could put in a delayed meta refresh with a link to your home page. What you are intending to do will probably cause more confusion than anything else.
-------------------- |
|
|
Jul 22 2008, 06:46 PM
Post
#3
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Posts: 206 Joined: 15-February 08 From: Plymouth |
Why would you want to do this? If a user cannot find what they are looking for they should be told that the article can not be located. You could put in a delayed meta refresh with a link to your home page. What you are intending to do will probably cause more confusion than anything else. I didn't want to do it either. I'm really glad that I'm not the only one who thinks it's a bad idea. What's preferable then, the straight 404 or the meta refresh? I thought that refresh/redirect via meta wasn't good for SEO. As I'm still learning, I've possibly got the wrong end of the stick again. -------------------- QUOTE I'm challenged enough without any extra weirdness in my life! |
|
|
Jul 23 2008, 02:21 AM
Post
#4
|
|
|
Master of the Universe ![]() Posts: 1,298 Joined: 15-February 08 From: London, England |
I didn't want to do it either. I'm really glad that I'm not the only one who thinks it's a bad idea. What's preferable then, the straight 404 or the meta refresh? I thought that refresh/redirect via meta wasn't good for SEO. As I'm still learning, I've possibly got the wrong end of the stick again. To be honest I don't really see the benefit. 404 means that page doesn't exist. If the page doesn't exist then I don't know why you want it listed. I supposed what could be cool is you brought up options. So if someone typed abuot.php you could have. OOp's this page does not exist. Did you mean? about Alternatively you could display a site map. Surely either of these methods would better benefit SEO and accessibility than straight up redirecting. -------------------- |
|
|
Jul 23 2008, 10:02 AM
Post
#5
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Posts: 206 Joined: 15-February 08 From: Plymouth |
To be honest I don't really see the benefit. 404 means that page doesn't exist. If the page doesn't exist then I don't know why you want it listed. I supposed what could be cool is you brought up options. So if someone typed abuot.php you could have. OOp's this page does not exist. Did you mean? about Alternatively you could display a site map. Surely either of these methods would better benefit SEO and accessibility than straight up redirecting. It's basically for links that come from external sites that we can't control. There are too many for just plain 301 redirects, that's why I created a custom 404 page with the full menu so that the site can still be accessed. However it's the SEO (soon to be ex) who suggested the redirect. I couldn't see the point to this either, as the full site is accessible via the menu. I can't code with php. -------------------- QUOTE I'm challenged enough without any extra weirdness in my life! |
|
|
Jul 29 2008, 08:12 PM
Post
#6
|
|
![]() Co-Founder ![]() Posts: 2,664 Joined: 13-February 08 From: On the forum! |
I've heard this in the past. If the page does not exist then you apply a 301 redirect to the home page. However, I personally would much rather display a friendly 404 page letting the user know that they have incorrectly typed the URL, and perhaps show suggestions as to what page they may have been trying to access.
However, if you really wish to do a 301 redirect to the home page. Follow these steps if you are on a Linux/Apache server... 1) Add this bit of code to your .htaccess CODE RewriteEngine On ErrorDocument 400 /errors/400.html ErrorDocument 401 /errors/401.html ErrorDocument 403 /errors/403.html ErrorDocument 404 /errors/404.html ErrorDocument 500 /errors/500.html 2) Create a folder in the root of your domain called "errors". 3) Create the following files, "400.html", "401.html", "403.html", "404.html", "500.html". 4) Place the following code in each of the documents.... CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="refresh" content="0; url=http://www.your-domain.com/"> <title></title> </head> <body> </body> </html> -------------------- Thanks,
Jacob |
|
|
Jul 30 2008, 09:13 AM
Post
#7
|
|
|
Squeeze Machine ![]() Posts: 682 Joined: 15-February 08 From: UK |
I've heard this in the past. If the page does not exist then you apply a 301 redirect to the home page. However, I personally would much rather display a friendly 404 page letting the user know that they have incorrectly typed the URL, and perhaps show suggestions as to what page they may have been trying to access. Agreed. Don't surprise the user by randomly and unexpectedly sending him to the homepage. It's better that he knows what happened; he might even send you a helpful email! Custom 404s are a good idea, and you can include a link to the homepage on them. This way, your user chooses were he wants to go, instead of being forced to go there. |
|
|
Jul 30 2008, 01:01 PM
Post
#8
|
|
![]() Co-Founder ![]() Posts: 2,664 Joined: 13-February 08 From: On the forum! |
Agreed. Don't surprise the user by randomly and unexpectedly sending him to the homepage. It's better that he knows what happened; he might even send you a helpful email! Custom 404s are a good idea, and you can include a link to the homepage on them. This way, your user chooses were he wants to go, instead of being forced to go there. Yep, I agree. If you would like to apply Mike's suggestion, you can use the code above. The only thing you will need to remove is the meta redirect placed in the header. CODE <meta http-equiv="refresh" content="0; url=http://www.your-domain.com/"> Good Luck, let us know what you decide! -------------------- Thanks,
Jacob |
|
|
Aug 1 2008, 01:27 PM
Post
#9
|
|
![]() Rapid Squeezer ![]() Posts: 239 Joined: 14-February 08 From: NY, USA |
Hi Guys,
Yes, this is a good thing for pages that no longer exist. I use this on the Raineri Jewelers site currently and have used it pretty much any time I redesign a site and consider SEO. What you;re doing as far as SEO goes it telling the crawler that the page it's looking for no longer exists, and will 'never' exist again. The crawler will then remove the page from it's index and use the page you're pointing to instead. That being said, you do NOT want to point all of your 301's to the homepage, rather to the corresponding new page. So, if your old page was "about.php", you should point your 301 to your new "About" page. Here's a few of my 301's so you can get the idea... Redirect 301 /contactus.php http://www.rainerijewelers.com/contact.html Redirect 301 /about_us.htm http://www.rainerijewelers.com/about.html Redirect 301 /menswatchbrands.php http://www.rainerijewelers.com/watches/mens-watches.html Redirect 301 /menswatches.php http://www.rainerijewelers.com/watches/mens-watches.html Redirect 301 /products.php http://www.rainerijewelers.com/ Redirect 301 /womenswatchbrands.php http://www.rainerijewelers.com/watches/womens-watches.html Redirect 301 /womenswatches.php http://www.rainerijewelers.com/watches/womens-watches.html Hope this helps! Rich -------------------- |
|
|
Aug 9 2008, 07:13 PM
Post
#10
|
|
![]() Rapid Squeezer ![]() ![]() ![]() ![]() Posts: 206 Joined: 15-February 08 From: Plymouth |
Hey all
Thanks for the help. I've decided to keep my customised 404 error page with the full menu so that the entire site can still be accessed. Can I clarify something on redirects? At the mo we have the following set-up: www.blah.com/blah, but it will soon be moved to www.blah.com - no second folder. Should I set up one redirect? - Redirect 301 www.blah.com/blah http://www.blah.com Will this be sufficient or am I off again? Thank you This post has been edited by Popje: Aug 9 2008, 07:14 PM -------------------- QUOTE I'm challenged enough without any extra weirdness in my life! |
|
|
Oct 16 2008, 06:37 PM
Post
#11
|
|
![]() Fresh Squeezed ![]() ![]() Posts: 32 Joined: 15-October 08 |
Hello, thought I'd add my 2c - as rewake said above this is absolutely a good idea for pages which have changed names.
But definitely NOT on the 404 page itself! I've seen this several times, and to cut a long story short it causes many more problems than it solves |
|
|
Oct 16 2008, 06:47 PM
Post
#12
|
|
![]() Squeeze Machine ![]() Posts: 508 Joined: 7-October 08 From: Australia |
Popje, I think possibly your SEO person was slightly confused about something they read.
404s are for pages that do not exist, and 301s are for pages that have moved permanently. They should be thought of in this way, and they should act as such too. Your 404 page should return a status code of 404, and should also provide the user with some options for re-orienting themselves and locating the content they were looking for. I quite like Jason's suggestion of a "Where you looking for: correctlyspelledpage.html?", this can be achieved by using a Levenshtein algorithm, but is fairly advanced. A 404 page should not redirect, even via meta refresh, because it's unlikely you know where the user was trying to go, even if you can have a good guess, this should be a suggested option only. Your 301 page should return a status code of 301, and redirect the user to the new/current page invisibly. -------------------- The more you visit, the more I'll post: http://japheththomson.com/
|
|
|
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:






Jul 22 2008, 04:24 PM












