In terms of the actual DNS records required to make this work:
In your zone file, at the beginning you’ll have something like this:
[code:1:8f6de9b9a2]
example.com IN SOA ns.example.com. admin.example.com. (
2003051701 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
14400 ; minimum (4 hours)
)
NS ns.example.com.
NS ns2.example.com.
MX 10 mail.example.com.
A 12.34.56.78
[/code:1:8f6de9b9a2]
Note the last line. It creates an A record for the domain entry ‘example.com’ and equates ‘example.com’ to 12.34.56.78
Then you can add a CNAME for www:
[code:1:8f6de9b9a2]
www IN CNAME example.com.[/code:1:8f6de9b9a2]
This points ‘www.example.com’ to ‘example.com’, so now http://example.com/ and http://www.example.com/ will match.
Comments are closed