A records

Discussion in 'Server Operation' started by fernandoch, Feb 3, 2020.

  1. fernandoch

    fernandoch Member HowtoForge Supporter

    When you create a new A record, do you always create them with the www and without them?
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    depends on what you want to use and how you want to use it.

    in dns you can use @ or a blank space or domainname.tld. for the root A record
    (note the trailing . on the domain name, without that dns will append the domain name to the record, which it does with @ or a blank space, which is why they work) (a @ is taken as a blank space)
    if you want www.domainname.tld to resolve and be usable as well, then you create an additional A record for it, using just www where the domain name will get appended, or www.domainname.tld. (again, note the trailing . without this it would resolve as www.domainname.tld.domainname.tld )

    alternatively, you could CNAME www to domainname.tld.
    ahrasis likes this.

Share This Page