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!

Changing primary domain to parked domain issue

Discussion in 'Bind/DNS/Nameserver' started by roadpaperweight, Apr 11, 2018.

Tags:
  1. roadpaperweight

    roadpaperweight Registered

    Joined:
    Apr 11, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    santiago chile
    cPanel Access Level:
    Root Administrator
    I had a customer request to change his domain from domain.cl to domain.net, and the old domain to the new one.

    I looked through the forums and it seemed pretty straight forward. In WHM, I went to modify an account, changed the domain name to domain.net, and parked domain.cl.

    I thought this would make both domains point to domain.net, or at least that domain.net would show up in the URL, but it isn't happening. Domain.net is redirecting to domain.cl.

    I tried to create a redirect from domain.cl to domain.net and got a "redirect to many times" error when loading the page.

    I am clearly not understanding this correctly. Why would the primary domain redirect to a parked domain? How should I try and fix this?
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,195
    Likes Received:
    228
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @roadpaperweight

    Was domain.net already added to the account prior to making these changes? Can you show me the contents of the following of course switching the domain names to domain.cl and domain.net before posting:

    Code:
    grep DNS /var/cpanel/users/$username
    
    cat /var/cpanel/userdata/$username/main
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. roadpaperweight

    roadpaperweight Registered

    Joined:
    Apr 11, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    santiago chile
    cPanel Access Level:
    Root Administrator
    Thanks for the response.

    The original domain was example.com. The new domain is example.net. What I did was modify account > changed the domain name to example.net which had never been on the server before. I then parked example.com.

    grep DNS /var/cpanel/users/$user output


    DNS=example.net

    DNS1=example.com

    cat /var/cpanel/userdata/$username/main output


    ---

    addon_domains: {}


    main_domain: example.net

    parked_domains:

    - example.com

    sub_domains: []




    I also went to redirect-checker.org/ to see what is says and for the new domain, example.net it gave me


    >>> example.net

    Code:
    > --------------------------------------------
    > 301 Moved Permanently
    > --------------------------------------------
    
    [B]Status:[/B] 301 Moved Permanently
    [B]Code:[/B] 301
    [B]Date:[/B] Wed, 11 Apr 2018 17:55:44 GMT
    [B]Server:[/B] Apache
    [B]X-Pingback:[/B] http://example.com/xmlrpc.php
    [B]Upgrade:[/B] h2,h2c
    [B]Connection:[/B] Upgrade, close
    [B]Location:[/B] https://example.com/
    [B]Content-Type:[/B] text/html; charset=UTF-8
    
    

    >>> example.com
    Code:
    > --------------------------------------------
    > 200 OK
    > --------------------------------------------
    
    [B]Status:[/B] 200 OK
    [B]Code:[/B] 200
    [B]Date:[/B] Wed, 11 Apr 2018 17:55:46 GMT
    [B]Server:[/B] Apache
    [B]X-Pingback:[/B] https://example.com/xmlrpc.php
    [B]Link:[/B] https://example.com/wp-json/; rel="", <[URL='https://example.com/>; rel=shortlink
    [B]Upgrade:[/B] h2,h2c
    [B]Connection:[/B] Upgrade, close
    [B]Content-Type:[/B] text/html; charset=UTF-8
    
    
    and for the original, now parked domain, example.com, it gave me
    Code:
    
    >>> http://www.example.com
    
    [code]
    > --------------------------------------------
    > 301 Moved Permanently
    > --------------------------------------------
    
    [B]Status:[/B] 301 Moved Permanently
    [B]Code:[/B] 301
    [B]Date:[/B] Wed, 11 Apr 2018 17:58:16 GMT
    [B]Server:[/B] Apache
    [B]X-Pingback:[/B] http://example.com/xmlrpc.php
    [B]Upgrade:[/B] h2,h2c
    [B]Connection:[/B] Upgrade, close
    [B]Location:[/B] https://example.com/
    [B]Content-Type:[/B] text/html; charset=UTF-8
    
    

    >>> example.net
    Code:
    > --------------------------------------------
    > 200 OK
    > --------------------------------------------
    
    [B]Status:[/B] 200 OK
    [B]Code:[/B] 200
    [B]Date:[/B] Wed, 11 Apr 2018 17:58:19 GMT
    [B]Server:[/B] Apache
    [B]X-Pingback:[/B] https://example.com/xmlrpc.php
    [B]Link:[/B] <https://example.com/wp-json/>; rel="", <[URL='https://example.com/>; rel=shortlink
    [B]Upgrade:[/B] h2,h2c
    [B]Connection:[/B] Upgrade, close
    [B]Content-Type:[/B] text/html; charset=UTF-8
    
    In WHM it definitely shows example.net to be the primary domain of the user domain. It also shows example.com to be parked under example.net.
    I hope this is everything you need. I don't understand why this redirect is happening. Thanks again for your help.
     
    #3 roadpaperweight, Apr 11, 2018
    Last edited by a moderator: Apr 11, 2018
  4. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,195
    Likes Received:
    228
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @roadpaperweight

    please note that I removed the actual domain name from the post.

    Originally the domain was example.com - in the documentroot for this do you have a CMS installed (like wordpress?)

    After you modified the domain to example.net did you also update the site URL information?


    Thank you,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. roadpaperweight

    roadpaperweight Registered

    Joined:
    Apr 11, 2018
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    santiago chile
    cPanel Access Level:
    Root Administrator

    Wow. How embarrassing. That was the problem. Thanks for you help. I really appreciate it.
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,195
    Likes Received:
    228
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @roadpaperweight

    No worries, you're most welcome! I'm happy we found the cause of the issue!


    Thank you,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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