Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Alias Domain Opens Main Domain

Discussion in 'Bind/DNS/Nameserver' started by JuliaM, Mar 4, 2017.

  1. JuliaM

    JuliaM Registered

    Joined:
    Mar 4, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Syracuse, NY, United States
    cPanel Access Level:
    Root Administrator
    I apologize if this has been answered elsewhere but I've searched everywhere for a solution. I have 2 domain names for a website. domain1.com and domain2.com domain1.com was the first one created on the server. I added domain2.com as an alias. When I visit domain2.com in a web browser, it changes to domain1.com in the address bar. Is there any way to fix this? If a visitor goes to domain1.com I want it to remain that address in the address bar, if a visitor goes to domain2.com I want it to remain domain2.com in the address bar. I dont want it to redirect, I want it to work as an alias.
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Hello,

    This is because of a redirect, either via .htaccess or a PHP redirect.

    If you are using WordPress for example, it will use a PHP redirect to ensure the domain you have set in the settings is the domain that is redirected to.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  3. JuliaM

    JuliaM Registered

    Joined:
    Mar 4, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Syracuse, NY, United States
    cPanel Access Level:
    Root Administrator
    Yes, it is a WordPress site. So I'm guessing the only solution is to create it as a separate site with a separate WP database?
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    703
    Likes Received:
    114
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    That is correct, WordPress will only allow one domain per install.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,793
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    BastaMedia likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice