The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Alias Domain Opens Main Domain

Discussion in 'Bind / DNS / Nameserver Issues' 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:
    588
    Likes Received:
    88
    Trophy Points:
    153
    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.
     
    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:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    That is correct, WordPress will only allow one domain per install.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page