4

I am setting up a WordPress multisite with numerous subsites. Some of these subsites will have a custom domain. I may end up switching hosting providers down the road and want to avoid having to get my clients to switch their records when I do so.

Is there a way to set up the DNS flow so that it is:

Client's DNS A Record > Redirection controlled by me > final server

rather than:

Client's DNS A Record > final server

Would this be too slow?

1
  • 3
    Ask your clients to do a CNAME record towards a name you control, instead of a direct A record, otherwise they will have to update it once you change your hosting. Feb 15, 2021 at 18:41

1 Answer 1

6

You cant do this with an A record, and arguably the DNS spec is remiss in not having something that works exactly as you propose.

Setting up an A record for a subdomain you control and replacing the clients A record with a CNAME is as close as you can get. This only works correctly for the clients subdomain - ie www.clientdomain.example is OK but clientdomain.example will not work as intended.

Some domain providers have come up with an artificial construct called an Alias record. This attempts to emulate the behaviour you are after by appearing like an A record when queried, with the DNS service flattening the alias to an A record. This implementation is provider specific and somewhat implementation specific and requires your clients to use their systems to flatten the domain - so while useful its not a generic answer.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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