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.

AddOn domain redirects to subdomain

Discussion in 'General Discussion' started by radu.costinean, May 19, 2014.

  1. radu.costinean

    radu.costinean Registered

    Joined:
    May 19, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi there,
    I have my own VPS, I installed cPanel-WHM and I created my first cPanel account in WHM to manage my domains.
    When I created it, I assigned to it the domain website.com. After few days, which is today, I added another domain something.com which has the folder under /home/account-name/public_html/something.com.
    The problem is that adding something.com as an addon domain in cPanel, it created a subdomain for website.com too.
    Example: something.website.com
    So when I first opened in my broweser something.com, it redirected me to website.com/something.com

    However I managed to do a redirect of the subdomain something.website.com to something.com. But I don't think that's the proper way it works :)

    So how can i fix this issue, that whenever I add a new addon domain, it won't create a subdomain but a domain.

    Thanks :)
    Radu

    - - - Updated - - -

    Btw I have created an wildcard for website.com to install Wordpress Multisite. I created this wildcard *.website.com as a subdomain
     
  2. vanessa

    vanessa Well-Known Member
    PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    817
    Likes Received:
    22
    Trophy Points:
    18
    Location:
    Virginia Beach, VA
    cPanel Access Level:
    DataCenter Provider
    When you create an addon domain, it always creates a subdomain. Don't create a redirect, just add the addon domain and access it normally.

    If you don't like how this works, consider using WHM to add the second domain in its own cPanel account.
     
  3. radu.costinean

    radu.costinean Registered

    Joined:
    May 19, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    That's strange because I have other domain hosted with a company (shared hosting) and they provide cPanel account. When I added a second addon domain, it created the subdomain, but it was pointing to "something.com" (where something.com is the second domain). Instead now when I went to http://something.com it was redirecting me to http://website.com/something.com/ which is strange :)
    Anyway, thanks for clarifying it :)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It seems like you might have a script installed that redirects the domain name to the URL you see in the address bar, or you have custom Mod_Rewrite rules added within the account's .htaccess file in the public_html directory that are redirecting the domain name. Please check to see if either of those two scenarios apply here.

    Thank you.
     
  5. radu.costinean

    radu.costinean Registered

    Joined:
    May 19, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I suppose you are right, because it might be the htaccess rules I added for Wordpress MU. I am not an htaccess expert and I can't confirm it, but that might be the cause because I don't have other script installed on that server.
    Thanks :) You can mark this thread as solved.

    Regards,
    Radu
     
Loading...

Share This Page