Pointing your domain at HostingSwift
A records, CNAMEs, TTLs and how to move a live site without downtime.
Connecting a domain is the step most people find fiddliest, mostly because DNS is invisible. Here is the whole picture.
The two records that matter
A record — maps a hostname to an IPv4 address.
example.com. A 203.0.113.10
www.example.com. A 203.0.113.10CNAME — maps a hostname to another hostname.
www.example.com. CNAME yoursite.hostingswift.exampleUse an A record when you have a stable IP. Use a CNAME when the destination's IP may change and you would rather follow the name. You cannot put a CNAME at the domain apex (example.com) in strict DNS — many providers offer a workaround ("ALIAS", "ANAME", or flattened CNAME) and we support those where the registrar does.
In practice
Find the DNS settings for your domain — either in your HostingSwift panel under Domains, or at your registrar.
Add an A record for
@(the apex) → your service IP.Add an A record or CNAME for
www→ the same IP or your hosting hostname.Save. Changes propagate within the record's TTL.
TTL: the dial that decides how fast change happens
Every record has a TTL (time-to-live) — how long resolvers may cache the answer.
Low TTL (300s or 60s) — changes go live fast. Use this before a planned migration.
High TTL (3600s+) — fewer queries, slower to change.
Before moving a live site, lower the TTL a day in advance to 300 seconds, make the move, then raise it again. That way the switch is nearly instant for everyone.
Moving a live site with no downtime
Stand up the new site and test it on a temporary hostname or by editing your local
hostsfile.Lower the TTL for the records you are about to change.
Switch the A record to the new IP.
Keep the old site running for at least the old TTL, then decommission it.
Restore the TTL to its normal value.
Full detail, including mail records you must not forget, is in Migrating your hosting to HostingSwift.
Common mistakes
Forgetting
www. Apex and www are separate names; set both.Changing nameservers and the A record. Pick one approach; mixing them causes confusion.
Ignoring the TTL and then waiting an hour for a "simple" change.
Breaking email. If you host mail elsewhere, do not delete the MX records while editing DNS.
Typo in the IP. DNS will happily publish a wrong address.
Related reading