Ever seen those custom Error 404 pages and wondered how they did that? When I first learned the technique I thought it was too technical, but it’s actually quite easy.
You need to do is create a “.htaccess” file and upload it to the server (or subdirectory) where your site is hosted. If you have no idea how to upload a file to your hosting service, most providers have how-to sections on that or you can download SmartFTP for free which has easy to follow video tutorials. Open a text editor like notepad on your computer since we’ll be creating a new simple text file that will make miracles happen.
All you need to do in this text file is add a few lines that will tell your server to redirect visitors to the page of your choice instead of the typical error message. Let’s just focus on three of the most common errors so you’ll get the hang of this.
On the first line of the text file type:
ErrorDocument 404 http://www.customurl.com
Now, instead of visitors getting the typical white text page that says Error 404 they’ll see the website you inserted! It can be a custom page on your website or another one of your choice, like say…and affiliate link!
This gets pretty exciting, especially if your site gets lots of traffic. Before I implemented this tactic my site got about one thousand error messages in a single month, and I’m sure most of those visitors were lost to me forever.
Now go ahead and add the next two lines in the text file.
ErrorDocument 400 http://www.customurl.com
ErrorDocument 403 http://www.customurl.com
Your file should now be properly prepared to redirect visitors to the page of your choice when a server error occurs.
Now we need to make your document functional. In Notepad you can go ahead and save it as htaccess.txt for now. Now log in to your server and upload the file to your site’s root directory (that’s the main one where all the main pages are).
Once you’re online with your server’s interface and you’ve uploaded the text file, use the server’s interface to rename the document, and instead of being “htaccess.txt” you should rename it “.htaccess” with no file name extension. Don’t forget to include the period at the beginning of the name of the file or else this won’t work for you.
To test that you’ve gotten the settings right, type your main domain name into your browser then backslash anything you want. For example, yoursite.com/blahblahblah and instead of getting the typical Error 404 message you should see the URL you put into the .htaccess file you just uploaded. If this didn’t work for you, review the steps. If you still have trouble, contact your server’s support line and they should be able to guide you to making it work.
You should make a custom .htaccess file for each subdirectory of major importance as well. If you host multiple domains, make a custom file for each. If you have forums or blogs be sure that the scripts you are running include these lines in the .htaccess file that came with them. If not, you can add them yourself.


This site serves as a source of truth regarding tools, products, and services of interest to marketers who use “black hat” tactics.