Link to home
Start Free TrialLog in
Avatar of xcdev
xcdev

asked on

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
Avatar of PorterGraphics
PorterGraphics
Flag of United States of America image

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.
Avatar of KevinTHayashi
KevinTHayashi

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.
Avatar of xcdev

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of KevinTHayashi
KevinTHayashi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial