Forum Moderators: open

Message Too Old, No Replies

404 Error page - the correct way to handle it

         

moopy

8:58 am on Jun 18, 2007 (gmt 0)

10+ Year Member



Hello again,

Another important question I have...

I have a website which needs pdf and swf redirection (Working on IIS server). I didn't find any way to do this (is there?).

So I figured I'll use a 404 error page and make a permanent 301 redirect to the homepage.

But then I thought it might not be such a bright idea since 301 is not 404...

What's the correct way to handle these pdf and swf files which I need to redirect from to another page?

Thanks.

ogletree

5:03 am on Jun 20, 2007 (gmt 0)

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



404 and 301 should only be used for what they are intended for. 301 for perm redirect and 404 for not found. I'm not sure what you are wanting to do. What do you mean by "pdf and swf redirection"? You make is sound like it is normal to redirect those type of pages. Are these files that you have deleted? Do you not want people to view those types of files?

I normally set up a custom 404 page and exclude it in the robots.txt. I set up a custom page that tells them that the page they came to has moved and then I try to suggest places for them to go. I detect the page they tried to get to and guess some topics they might be interested in and display some links. I also always put a search box on the page as well. If you just send them to the front page they will be confused since they were trying to get to a specific page.

vlasti

7:32 pm on Mar 13, 2008 (gmt 0)

10+ Year Member



Nice ogletree, thanks for sharing!

bwnbwn

7:31 pm on Mar 14, 2008 (gmt 0)

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



I like the search idea will add that to my custom 404 tonight good idea thanks for sharing.

Not exactly why it is excluded by robots.txt as I want to know if or how many google is finding if I excluded it I wont know unless I run a site scan.

"What's the correct way to handle these pdf and swf files which I need to redirect from to another page?"

301 Redirect them to a landing page as advised and use the robots.txt to keep the pages from getting indexed. I wouldn't send them to a 404 page but a new cutom page that wont get indexed