Changing primary domain to parked domain issue

Apr 11, 2018
5
0
1
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?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,269
313
Houston
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
 
Apr 11, 2018
5
0
1
santiago chile
cPanel Access Level
Root Administrator
Hi @roadpaperweight

Was example.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 example.com and example.net before posting:

Code:
grep DNS /var/cpanel/users/$username

cat /var/cpanel/userdata/$username/main
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.
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,269
313
Houston
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,
 
Apr 11, 2018
5
0
1
santiago chile
cPanel Access Level
Root Administrator
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,

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