methodology behind using cname to verify domain ownership for use with a host

by Chibi   Last Updated September 11, 2019 17:00 PM

Webhosting services, such as Squarespace, enable customers to connect their third-party-hosted domains to their site without transferring ownership or switching Nameservers. This is achieved by adding specific records to the dns configuration of the domain itself. Here is what Squarespace requires:

HOST            RECORD    VALUE
9aa5s43zpykpn   cname
www             cname
@               a
@               a
@               a
@               a

Presumably, when the domain is visited, the A record connects to the appropriate server, which, using the CNAME record, discerns and directs the request to the proper content based on the unique identifier stashed in the host (9aa5s43zpykpn).

Is this actually how that works and the reason for doing it?

Does get queried as part of the dns resolve? (before squarespace's servers get the request via the A record)

Are there any other purposes at work here for this type of setup?

Why the need for the www record?

Most importantly, what technique would Squarespace be using to actually view the CNAME record for verification? ie, is there an appropriate DNS record for this on their end, or would the server have to identify the incoming host (domain), match and find the associated hash (9aa5s43zpykpn) in a database, and then use a tool like dig to verify the cname record exists?

Insight appreciated.

Related Questions

Updated October 12, 2015 05:00 AM

Updated August 21, 2015 18:00 PM

Updated September 21, 2017 10:00 AM

Updated May 18, 2015 23:00 PM

Updated July 11, 2017 10:00 AM