====== A Records ====== This will only work if you are using Gandi' DNS, so you may want to verify this beforehand. If you don't know how to edit your zone file, see [[:en:dns:zone:edit|the step-by-step tutorial]]. You have two options for editing your zone file: normal and expert. {{ en:domains:management:zone:edit_mode.png?150|}} ===== Normal interface ===== In normal mode (recommended for beginners), your zone file will be shown with each resource record on its own line, like this: {{ en:domains:management:gandi-dns-zonefile:dnszone-normal-en.png?640 |}} Click the pencil icon to edit the corresponding line, or click "Add" to add a new record. You will be presented with a form that looks like this: {{ en:domains:management:zone:a_record-normal.png?350 |}} Each field corresponds to one of these example columns: ^ **[[:en:dns:zone|Type]]** ^ **[[:en:domains:management:zone:ttl|TTL]]** ^ **Name** ^ **Value** ^ **Effect** | | //Record type// | //Lifespan// | //Subdomain// | //IP Address (IPv4)// | ::: | | A | 3 hours | ''[[:en:dns:zone:www|www]]'' | ''123.123.123.123'' | ''%%www.mydomain.tld%%'' will point at the server found at ''123.123.123.123''. | | A | 3 hours | ''@'' | ''456.456.456.456'' | ''%%mydomain.tld%%'' will point at the server found at ''456.456.456.456''. | | A | 3 hours | ''*'' | ''789.789.789.789'' | All subdomains not otherwise specified will point at the server found at ''789.789.789.789''. | | A | 3 hours | ''photos'' | ''333.333.333.333'' | ''photos.mydomain.tld'' will point at the server found at ''333.333.333.333'' | For example, if all of the records above existed in the zone file of domain ''mydomain.tld'': * ''mydomain.tld'' will point at ''456.456.456.456'' * ''%%www.mydomain.tld%%'' will point at ''123.123.123.123'' * ''www2.mydomain.tld'' will point at ''789.789.789.789'' * ''photos.mydomain.tld'' will point at ''333.333.333.333'' * ''blog.mydomain.tld'' will point at ''789.789.789.789'' Note that the configuration above would cause ''mydomain.tld'' and ''%%www.mydomain.tld%%'' to point to different servers (probably not your desired effect). When you're done, be sure to click Submit. You will see this message: {{ en:domains:management:zone:record_successfully_added.png?300 |}} Then, you must click "Activate this version": {{ en:domains:management:zone:message-this_version_is_not_active-activate-.png?640 |}} You'll receive a confirmation message that the zone file's version has been changed. Now, you just have to wait about three hours for your changes to propagate. \\ {{ en:domains:management:zone:edit_mode_expert.png|}} ===== Expert interface ===== In expert mode, your zone file will look something like this: {{ en:domains:management:zonefilev3.jpeg?450 }} You will now need to add your desired A line. Here is a model that you can follow: www 10800 IN A 123.123.123.123 Simply replace ''www'' with the name of the subdomain you want, and ''123.123.123.123'' in the above example with the IP address that your provider gives you. As a reminder, ''*'' means "every subdomain", so if you have an ''*'' A record, then there is no need for ''www'' unless you want to override the IP address you gave with your ''*'' entry. If you want **just** the domain, then you need the ''@'' record you see in the above example, or: @ 10800 IN A 123.123.123.123 Usually both the ''*'' and ''@'' are used. When you are done, click on the "Submit" button on the bottom of the page to continue. All that remains now is to wait for the changes to take affect, so for this please wait at least 3 hours. ===== When to use an A record ===== A records are ideal for pointing your domain (or subdomain) at a server that has a static IP. ===== When not to use an A record ===== A records don't work well in scenarios where your server IP changes a lot. You might want to use a [[en:dns:zone:cname-record|CNAME record]] instead. ===== See also =====