Forum Moderators: open

Message Too Old, No Replies

How to redirect to homepage?

if the visitor wrong filename

         

Murali

10:30 am on Aug 29, 2005 (gmt 0)

10+ Year Member




Suppose a user is directly typing a particular webpage address directly in addressbar (but with spelling mistakes in filename), how can we redirect him to home page instead of showing a "Page not found" error.

(eg: if the user type www.domain.com/wrongfilename.htm it should redirect to www.domain.com.

please tell me a solution

thanks

Murali

thesheep

11:12 am on Aug 29, 2005 (gmt 0)

10+ Year Member



Hi, if this is possible, then it will be something that you set up on your server, so you should probably not be posting in the 'browser side world' section. If you're running Apache try asking them in the Apache section?

DanA

11:19 am on Aug 29, 2005 (gmt 0)

10+ Year Member



If you are running Apache add the following line in .htaccess:
ErrorDocument 404 [yourdomain...]

grandpa

11:19 am on Aug 29, 2005 (gmt 0)

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



<and only seconds later>

This thread about Custom 404 [webmasterworld.com] might help you Murali. One way is to modify your .htaccess file and redirect to your index page.

Murali

11:35 am on Aug 29, 2005 (gmt 0)

10+ Year Member



Thanks for the response.

But my site is hosted in windows server. I couldn't find any .htaccess file when i ftplogin the site.

where to do the modifications?

kaled

11:51 am on Aug 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Assuming you can customise your error page, all you have to do is add a meta redirect in the <head>. This has the advantage that you can add a short delay so that the user knows what's gone wrong (assuming you use a sensible error message and delay).

Kaled.

Murali

1:22 pm on Aug 29, 2005 (gmt 0)

10+ Year Member



I don't know where the error page is located in the server. (or is there any error page at all)

I get the following error, if the requested page is not found.
----------------------------------------------
Not Found

The requested URL was not found on this server.

Web Server at www.domain.com
----------------------------------------------

please help

g1smd

2:08 pm on Aug 29, 2005 (gmt 0)

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



Write a custom 404 page that contains links to wherever the visitor should be sent.

Do not redirect to the index page. You will be setting yourself up for serving duplicate content: any site that links to a URL on your site that does not exist will let Google see that non-existant page as being a duplicate of your real index page, and one or the other of them will be dropped out of the SERPs. If their linking page has a higher PR than your real index page, then it is your index page that might get dropped.

Never redirect to the index page. Simply serve a custom 404 page with the navigation to major parts of the site included in that error page.

[edited by: g1smd at 2:09 pm (utc) on Aug. 29, 2005]

Murali

2:09 pm on Aug 29, 2005 (gmt 0)

10+ Year Member



Hi

I found the error page and i added meta tag information.

Now it is working as i wanted.

Thanks to all for helping me

Murali

2:21 pm on Aug 29, 2005 (gmt 0)

10+ Year Member



g1smd told


If their linking page has a higher PR than your real index page, then it is your index page that might get dropped.

Actually my error page contain no information. just the META DATA. In this case if redirecting to index page will affect my ranking?

g1smd

2:51 pm on Aug 29, 2005 (gmt 0)

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



Summarising what I said above:

If I link to www.your-site.com/some-made-up-page-name.html that does not exist (and you are redirecting to your index page), then it is possible for Google to index that "page" as being a duplicate of your index page.

If my site has very high PR, then the content of your index page will be indexed as www.your-site.com/some-made-up-page-name.html and your index page itself will drop from the SERPs, filtered out as a duplicate of it.