Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 594
  • Last Modified:

Redirect my 404 pages to the homepage

I have a site with many pages which have external links pointing to them.

I've renamed many pages on my site.


So now lots of those external links produce 404 pages on my site which is bad.


Question:
How can I (.htaccess?) redirect (301) all of those 404 pages to the homepage, so if a link points to http://mydomain.com/invalid_page.html

and that page doesn't exist, I want the user when clicking on that link to get to: http://mydomain.com


Thanks
0
xcdev
Asked:
xcdev
  • 2
1 Solution
 
PorterGraphicsCommented:
You should be able to set up a custom 404 page through your host provider. Select your homepage as the page that is displayed when a 404 error is encountered.
0
 
KevinTHayashiCommented:
What is the webserver platform?  IIS, Apache, something else???

Do you have access to the webserver to make changes?  PorterGraphics is absolutely right on custom 404 error pages and something that is done all of the time.
0
 
xcdevAuthor Commented:
It is an apache server

I have access to it.


I want it to be a redirect so I won't lose the SEO, I don't want google to think I have abd page - a 404
0
 
KevinTHayashiCommented:
In your .htaccess file add a line for:

ErrorDocument 404 /index.html

More info here:
http://bignosebird.com/apache/a7.shtml

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now