Skip to main content

2 domains pointing to the same cpanel website?

Comments

5 comments

  • jack999
    ]My website domain eg. aaa.com is blocked by certain ISP in the country so I purchased another domain name bbb.com. For bbb.com i updated the name servers so aaa and bbb.com both have same name servers. In cpanel I add an addon domain bbb.com While using addon domain in my case the address of directory should be public_html/bbb.com or simply public.html? image: i.imgur.com/5JEpAaG.jpg I want that the url of the websites should be different. aaa.com is main domain in cpanel bbb is secondary when i open bbb it opens without any problem the address is bbb.com But; When I click on any link on the website then in the address bar aaa.com/mypost.html is shown I want that if someone visits the website using bbb.com and clicks on any link on the site then bbb.com/mypost.html should show up. If make bbb.com the primary domain and aaa.com parked domain will the old links work ??? For example aaa.com/myimagepost.html should work as it did before after making bbb primary domain

    I think since cpanel's primary domain is aaa.com so every thing in public_html is absolute and the images would also load from aaa.com/images/img.jpg' not bbb.com/images/img.jpg' which i want without making bbb.com primary domain
    0
  • cPanelMichael
    Hello :) I suggest adding "bbb.com" as a parked domain name instead of an addon domain name based on the scenario you described. Thank you.
    0
  • jack999
    ]Hello :) I suggest adding "bbb.com" as a parked domain name instead of an addon domain name based on the scenario you described. Thank you.

    Yes I did add bbb.com to parked domain and saw that. If you vist bbb.com it works fine but the images are still loaded from aaa.com as its primary domain. When i click on any link on the site then in the address bar aaa.com/mypost.html opens I want that if someone visits the website from bbb.com and clicks on any link on the site then bbb.com/mypost.html should show up. Is it possible that if a user visit website from bbb.com all the images and link are as bbb.com/anylink.html
    0
  • jack999
    You want domain mydomain.org parked domain on main domain mydomain.com and once any visitor browser mydomain.org/anything.html its still show domain name mydomain.org in browser and don't be mydomain.com. In that case while developing site for your main domain mydomain.com do not define domain name mydomain.com in your any web pages. Always use physical paths for sites link in files. The physical path will be like /home/user/public_html/anything.html etc. So that when ever any visitor browse domain mydomain.org/anythng.html files will be accepted from physical path and not from your domain mydomain.com.
    I searched a bit and found this, can anyone tell me how to implement this?
    0
  • cPanelMichael
    Yes, you need to update the coding of your website to use physical paths instead of the URL. The only way to implement this is to modify the website files to use the different paths. If you are using a third-party script then you could check with them to see if there is a way to change that behavior. Thank you.
    0

Please sign in to leave a comment.