1. Home
  2. Website
  3. How to redirect my error pages to an URL using .htaccess
  1. Home
  2. Website Tips
  3. How to redirect my error pages to an URL using .htaccess

How to redirect my error pages to an URL using .htaccess

In case you don’t want to use custom error pages and you prefer to redirect them to another website or to your home page, you can use the ErrorDocument directive to achieve this.

For example, if you wish to redirect the 404 (File Not Found) errors to http://domainname.com, you should add this line to your .htaccess file:

++++
ErrorDocument 404 http://domainname.com
++++

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help for 24X7!
Click here to talk us!

Leave a Comment