Point a Domain to a Sub Domain of a different server
Hi everyone,
I need some assistance with an issue I’m facing.
I have a main domain for hosting my website, for example, mydomain.app. I also created a subdomain to host another website, like subdomain-name.mydomain.app. Everything works fine, and when I access subdomain-name.mydomain.app, the server displays the correct website.
Now, I need to point a new main domain, such as mynewdomain.com, to the subdomain subdomain-name.mydomain.app.
Is there a way to do this? When I create a subdomain in cPanel, it doesn’t have a dedicated IP.
-
Can you just redirect it to the subdomain in the domain section of cpanel, that sounds like the easiest way. :)
1 -
The redirect works, but I need the URL to remain as the new domain rather than reverting to the subdomain URL
Example:
Url mynewdomain.com -> with the content of subdomain-name.mydomain.app
I already tried URL masking, but it gets lost in the server folders0 -
Sounds to me like you need to use htaccess and mod rewrite ill do some digging to see what i can find.
This might give you something to work with, though not the exact same situation it seems you could tweek it to make it work. Sorry i am not good at htaccess mod rewrite
https://stackoverflow.com/questions/31186078/htaccess-how-to-url-rewrite-a-sub-subdomain
1
Please sign in to leave a comment.
Comments
3 comments