My website is hosted by the same company from which I bought DNS. This company also takes care of my emails.
Now, however, I want to host my website on a different service, while the other services (email, ftp, smtp...) would remain on the old host. The instructions at my new host are to add my domain.sk
and www.domain.sk
as CNAME records pointing to their server.
However, I'm worried that this will make my emails not work.
Current setup:
domain.sk. IN NS ns.exohosting.sk.
domain.sk. IN NS ns1.exohosting.eu.
domain.sk. IN NS ns3.exohosting.cz.
domain.sk. IN A 92.240.253.107
domain.sk. IN MX 10 relay.exohosting.sk.
domain.sk. IN MX 10 relay1.exohosting.sk.
domain.sk. IN MX 20 relay2.dnsserver.eu.
domain.sk. IN MX 15 relay3.dnsserver.eu.
smtp.domain.sk. IN A 92.240.253.56
mail.domain.sk. IN CNAME pop3-imap.dnsserver.eu.
*.domain.sk. IN A 92.240.253.107
ftp.domain.sk. IN CNAME ftpcluster.dnsserver.eu.
setup.domain.sk. IN CNAME setup.dnsserver.eu.
webmail.domain.sk. IN CNAME webmail.dnsserver.eu.
wapmail.domain.sk. IN CNAME wapmail.dnsserver.eu.
webftp.domain.sk. IN CNAME webftp3.dnsserver.eu.
stats.domain.sk. IN CNAME stats1.dnsserver.eu.
autoconfig.domain.sk. IN CNAME autoconfigcl.dnsserver.eu.
autodiscover.domain.sk. IN CNAME autoconfigcl.dnsserver.eu.
To be added according to new host:
www.domain.sk. IN CNAME webapp-XXXX.pythonanywhere.com.
domain.sk. IN CNAME webapp-XXXX.pythonanywhere.com.
Answer
You can’t create a CNAME record with the same name as any other resource record so, unfortunately, you won’t be able to replace the domain.sk
A record with a CNAME record.
BIND and other name servers will prevent you from creating a CNAME record that masks other resource records. I presume the web interfaces of DNS hosts will also throw an error.
You can add the www
subdomain as a CNAME record since this doesn’t conflict with any other resource records.
www.domain.sk. IN CNAME webapp-XXXX.pythonanywhere.com.
For the bare domain, I’d agree with Andreas Rogge’s suggestion of configuring a web server for domain.sk
with your current host so that HTTP requests for domain.sk are redirected to www.domain.sk. I’d also suggest using a 301 Moved Permanently
redirect so that search engine page rank is preserved.
If you’re changing web hosts and you want to have other separate websites available by subdomains such as myapp.domain.sk
but hosted on pythonanywhere.com
, you could replace the wildcard A record with a wildcard CNAME record:
*.domain.sk. IN CNAME webapp-XXXX.pythonanywhere.com.
Presumably the hosting nameserver supports wildcard CNAME records. See Is a wildcard CNAME DNS record valid?
No comments:
Post a Comment