DNS records connect a domain to a server. Before you change anything, you need two things: the target your host gives you (an IP address or a hostname), and where your domain's DNS is managed. That's usually where you registered it, or a separate DNS provider if you changed the nameservers. Edit records in the right place, or the changes won't do anything.
- Get the target from your host: an IP address (for an A record) or a hostname (for a CNAME or ALIAS record).
- Sign in wherever your DNS is managed.
- For the root domain (example.com), add or update an A record with the IP address. If your host gave you a hostname and your provider supports ALIAS or ANAME records, use one of those. A CNAME can't go on the root domain.
- For a subdomain (like www.example.com), add a CNAME pointing to the hostname, or an A record pointing to the IP.
- Set the TTL to 300 seconds (5 minutes) while you work, so a mistake doesn't stick around. Raise it once everything works.
- Wait for the change to spread. How long depends on the TTL of the old record: minutes if it was low, hours if it was high.
Good to know
Just registered the domain or changed DNS providers? Nameserver changes take their own time to spread, sometimes longer than record changes. Make sure the nameservers point where you expect before you edit records.
Was this helpful?