Portal HomeClient AreaAnnouncementsKnowledgebaseSupport TicketsDownloads

Knowledgebase
You are here: Portal Home > Knowledgebase > Domain Name > Pointing a parked domain to an existing add-on domain

Pointing a parked domain to an existing add-on domain

It's not likely to come up very often, but you may have a situation where you have an add-on domain set up on your hosting account, and you want to have a second domain point to it.  This is normally not something you'd be able to do in cPanel, as you can't have two add-on domains using the same directory.  However, you can make it happen by adding a few lines to your .htaccess file.

First, you'd need to PARK the new domain that you wish to point to the add-on.  You'd do this in cPanel under Parked Domains.  Then, add the following lines to a file called .htaccess in your public_html directory (if there isn't one there already, create a new one):

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/addon_directory/
RewriteCond %{HTTP_HOST} ^parkeddomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.parkeddomain.com$
RewriteRule ^(.*)$ addon_directory/$1 [L]

In this example, "addon_directory" is the name of the directory used by the original add-on domain, and "parkeddomain.com" is the new domain you want to point to the add-on.



Was this answer helpful?

Add to Favourites
Print this Article

Also Read
How do I flush DNS information? (Views: 347)
How can I get Andrechelle Web Hosting DNS information? (Views: 185)
How can I transfer my Domain Name to Andrechelle? (Views: 177)
What is DNS Propagation? (Views: 442)

Powered by WHMCompleteSolution


Language: