Domain masking URL
Hi,
Is there a way I can addon a domain name, and redirect it using masking. I'm trying to achieve the following:
exampledomain.com has a website on it and isn't hosted locally. I add into my cPanel account, exampledomain2.com and when I click to exampledomain2.com I want to see exampledomain.com website, but the URL bar to say exampledomain2.com.
How do I achieve this. I know there was a way previously, but can't see it anymore.
-
You can add it as an domain alias and it will behave the way you want, assuming you do not use any rewrites in your code or htaccess that push it back to the primary domain. 0 -
Use .htaccess file to do that, with following code RewriteEngine On RewriteCond %{HTTP_HOST} ^exampledomain\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.exampledomain\.com$ RewriteRule ^/?(.*) http://www.exampledomain2.com/$1 [R=301,L]0 -
Hello @inteldigital, An Alias is best suited for the scenario you described. You can read more about aliases, including a chart noting the differences between aliases and addon domains, at: Aliases - Version 76 Documentation - cPanel Documentation Thank you. 0 -
@ADG - I would expect this to work well no matter what type of domain you are redirecting to or from. Can you let me know exactly what "in essence" means? Is this partially working for you? 0 -
@ADG - I would expect this to work well no matter what type of domain you are redirecting to or from. Can you let me know exactly what "in essence" means? Is this partially working for you?
thx for your reply. I have it working now.0
Please sign in to leave a comment.
Comments
6 comments