3

I have my own domain (e.g. contoso.com). I also have a (free tier) wordpress.com account, using contoso.wordpress.com. My DNS is hosted with my registrar, and email is using Google Apps/G Suite. Currently in my DNS settings I have a URL redirect from (www.)contoso.com to contoso.wordpress.com. Everything works as it should here (web, email), but contoso.wordpress.com shows up in the address field, and I would like contoso.com to appear.

So I signed up for the $13/yr plan at WP to add a mapped domain. It would appear that I need to move my DNS hosting from my registrar to WordPress, and then my domain contoso.com will appear in the browser address field, instead of contoso.wordpress.com.

Is there any way I can keep hosting my DNS with my registrar but still get the redirect and browser address field name change? If I set the primary domain to contoso.com in WP, I get into a redirect loop, and if I change the URL redirects to A records, the same thing happens. (I need a DKIM TXT record, and it appears WP will not allow me to create one.)

  • What are the NS records that wordpress.com suggests that you use? If you tell us that, we can probably help you copy the records from there into your existing nameserver. – Stephen Ostermiller Jan 25 '18 at 11:53
2

Wordpress.com has a support page about mapping a sub-domain to your site using their $13/year plan: https://en.support.wordpress.com/domains/map-subdomain/

Their instructions say that you need to do two things:

  1. Add CNAME records in your DNS:
    • sub.example.com CNAME to example.wordpress.com
  2. In your WordPress.com site add the domain to your site (example.wordpress.com) using the "Already own a domain" option and make it the "primary" domain.

Since you are using a bare domain name (no subdomain), you can't use a CNAME at the for the APEX record. To use an external DNS system, you will need to find one that supports "ALIAS" records. An ALIAS serves an A record, but it periodically looks up the IP address to serve from the alias that you set. I use Amazon Route53 when I need a DNS host with alias records.

You would want to set the following records:

  • example.com ALIAS to example.wordpress.com
  • www.example.com ALIAS to example.wordpress.com (WordPress would redirect this for you according to their documentation)

You could also try just setting the A record, however if WordPress changes their IP address, your site could stop working without warning. The following are the current IP addresses for lb.wordpress.com which is what your site currently points to:

  • example.com A 192.0.78.12
  • example.com A 192.0.78.13
  • www.example.com A 192.0.78.12
  • www.example.com A 192.0.78.13

To avoid the redirect loop problem, you need to clear your browser cache after making DNS record changes. Your browser must have the redirect from your domain name to your wordpress subdomain cached. Once your site is hosted on the domain name you need to clear your browser cache to be able to access your site. Only people who visited your domain name while it was redirecting will have that problem.

I also noticed that WordPress.com has instructions for getting mail to work: https://en.support.wordpress.com/domains/custom-dns/ That says that they support DKIM txt records. You may be able to use wordpress.com DNS servers and still have the DKIM support you need.

|improve this answer|||||
  • No. example.com can never be a CNAME to anything, as CNAME can not cohabit with anything else, and example.com already has SOA and NS records at least otherwise it would not resolve. – Patrick Mevzek Jan 25 '18 at 14:54
  • Right, having a CNAME at the apex will break mail, and they specifically say they are trying to get mail to work. – Stephen Ostermiller Jan 25 '18 at 14:56
  • 1
    No, it will not break mail, it is an invalid DNS configuration and no sane authoritative resolver will allow to load a zone with a CNAME at apex. See serverfault.com/a/613830 for example. – Patrick Mevzek Jan 25 '18 at 15:04
  • 1
    I edited the my answer to address these concerns. – Stephen Ostermiller Jan 25 '18 at 15:29
  • 1
    Thanks for the WP.com help page link. I added a CNAME record from www(.contoso.com) to contoso.wordpress.com. As mentioned, an apex CNAME record is not legal, so I added 2 A records pointing to the above lb.wordpress.com IPs for contoso.com. (My registrar is actually joker.com, and they don't have any "ALIAS" record options other than CNAME). After DNS propagation and browser cache clearing, the redirect is working as desired. – Conrad Jan 25 '18 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.