Back to My Domains

How To Custom Error Pages For Parked Domains

This article contains information about setting up custom error pages for my parked domains.

Parked Domains are pointed to the same folder as your main domain, so we have to use a script to distinguish requests to various domains.
This solution would use both .htaccess and a PHP-script.

1) At the first step, create various error pages for your domains and upload them into the public_html folder:

2) At the second step, create a file named as 404.php with the code like this:

 $domain = strtolower(getenv("HTTP_HOST"));
 if(preg_match("/^(?:www\.)?(.+)$/i",$domain,$matches)) {
  $domain = $matches[1];
 switch ($domain) {
  case "":
  case "":

This script would detect the domain and show the appropriate error page.

3) And finally, add the directive like below into the public_html/.htaccess file:

ErrorDocument 404 /404.php

Related Articles

What Is A Domain Name?
How To Register A Domain
How To Add Addon Domains In CHI
What Is An Anonymous Domain
What Can I Do With An Addon Domain?

Can’t Find what you need?

No worries, Our experts are here to help.