How do I change my root domain to another sub domain?
I have a Problem
my root domain dns changed to another host
but there are alot of domains located and hosted in linode
How do I change my root domain to another sub domain so I can login
and reached files and databases, mails, and all the content of my
server?
can you advice?
3 Replies
Hello Mohamed,
For illustration, let's call things as follows:
Description | Example |
---|---|
Your Registrar | registry.com |
Your Domain | example.org |
You Subdomains | sub1.example.org, sub2.example.org |
Your new DNS Servers | ns1.dns-servers.net, ns2.dns-servers.net |
Scenario 1: All DNS Records at dns-servers.net
You will need to copy all the records from the Linode DNS Manager for each subdomain to dns-servers.net. Instructions for creating the subdomains at dns-servers.net will be specific to that DNS provider.
You can use the Linode DNS Manager to browse through your subdomains to determine the records, or you can use the linode-api or the linode-cli to get your records programmatically. See the Appendix A for an example of how to do this.
Scenario 2: Use dns-servers.net for example.org, Linode's DNS servers for the subdomains
At dns-servers.net you will need to create NS records for each subdomain. Instructions for how to do this at dns-servers.net would be specific to that DNS provider.
Name Server | Subdomain |
---|---|
ns1.linode.com | sub1.example.org |
ns2.linode.com | sub1.example.org |
ns3.linode.com | sub1.example.org |
ns4.linode.com | sub1.example.org |
ns5.linode.com | sub1.example.org |
ns1.linode.com | sub2.example.org |
ns2.linode.com | sub2.example.org |
ns3.linode.com | sub2.example.org |
ns4.linode.com | sub2.example.org |
ns5.linode.com | sub2.example.org |
Note: You do not need to remove the root example.org zone from the Linode DNS Manager as it will not be referenced.
Appendix A: Downloading DNS Records from the linode-cli
Assuming you have installed the linode-cli you would use the following command to get the id for each domain:
linode-cli domains list
id | domain | type | status | soa_email |
---|---|---|---|---|
968719 | example.org | master | active | x@mail.me |
1769660 | sub1.example.org | master | active | x@mail.me |
818976 | sub2.example.org | master | active | x@mail.me |
For each domain, using its id, you would then use the following command to get the records for that domain (sub1.example.org is shown):
linode-cli domains records-list 1769660
id | type | name | target | ttl_sec | priority | weight |
---|---|---|---|---|---|---|
8057428 | TXT | v=spf1 mx -all | 0 | 10 | 5 | |
18461244 | A | blog | 10.105.2.127 | 0 | 0 | 0 |
19106776 | A | 10.164.221.203 | 0 | 0 | 0 | |
``` |
i was also looking for the same. WeCare Rite Aid surveyzop.com
You can also download your DNS Zones using the method described here: