How to redirect the 404 errors to 404.php file
-
how to redirect the 404 errors to 404.php file
-
Here's a helpful page that describes what you can do:
http://www.mcanerin.com/EN/articles/301-redirect-404-error.asp
For example, if you have an .htaccess file, you can add this line to the file:
ErrorDocument 404 /404.php
Hope this helps!
-
Zeeshan
All you need to do is edit your .htaccess file and add the following line of code:
ErrorDocument 404 /404.php
I hope this helps.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Find all external 404 errors/links?
Hi All, We have recently discovered a site was linking to our site but it was linking to an incorrect url, resulting in a 404 error. We had only found this by pure chance and wondered if there was a tool out there that will tell us when a site is linking to an incorrect url on our site? Thanks 🙂
Technical SEO | | O2C0 -
My 404 page is returning a 404
Hi there, Moz has highlighted that my 404 page is returning a 404... Looking at webmaster tools within crawl errors, it's the same story. The only big change on the website is that we recently moved to https for the entire site, so all pages have a 301 to the corresponding https page, including the old 404 http page. I don't know if that makes any difference? Any help or advice on how I reasolve this will be much appreciated. Thanks, Stuart
Technical SEO | | Stuart260 -
Redirecting homepage to subdirectory
Any issues with 301 redirecting a site's homepage to the English version subdirectory? Example: Original homepage: www.mysite.com New homepage: www.mysite.com/en/ The site is very old and very authoritative and trusted with lots of traffic.
Technical SEO | | SoulSurfer80 -
Wordpress and Redirects?
I want to update my permalinks - actually I want to change the URL's to fit the content and keywords better. I can choose "edit" the URL, but don't I need a redirect? I don't see any htaccess Plugin installed.......is that what I need to be able to change my URL's in Wordpress?
Technical SEO | | cschwartzel0 -
Redirect a 301 Redirect
Does any link juice get passed from a permanent redirect to a new 301 redirect? If so, are there any studies which indicate an estimated percentage?
Technical SEO | | RedCaffeine0 -
Client error 404 pages!
I have a number of 404 pages coming up which are left over in Google from the clients previous site. How do I get them out of Google please?
Technical SEO | | PeterC-B0 -
Client error 404
I have got a lot (100+) of 404´s. I got more the last time, so I rearranged the whole site. I even changed it from .php to .html. I have went to the web hotel to delete all of the .php files from the main server. Still, I got after yesterdays crawl 404´s on my (deleted) .php sites. There is also other links that has an error, but aren't there. Maybe those pages were there before the sites remodelling, but I don't think so because .html sites is also affected. How can this be happening?
Technical SEO | | mato0 -
301 redirects and OSE
We run a blog/video real estate site (yochicago.com) as one of the venues for sponsored content for our clients looking for off-page SEO and inbound links. I'm working with a client who we've linked to a handful of times in the last few weeks, but I'm not seeing any external links from our site on PRO/OSE. Come to find that our writer has been linking to http://clientsite.com, instead of http://www.clientsite.com, which is the canonical site. I wouldn't have thought that this would make a difference, and about an hour of web research seems to confirm that it shouldn't make a difference, save for losing a little bit of SEO credit. What am I missing? Any input would be appreciated.
Technical SEO | | mikescotty0