So, following on from setting up the domain for my new blog I now need to do some preparation before making the domain available to the public.
One thing that a good domain should do is have responsive postmaster@…, hostmaster@… and so on e-mail addresses. So, as I already use postfix and dovecot, I need to make them accept mail for paulsaunders.org.uk. So, editing /etc/postfix/main.cf, make the following changes:
virtual_mailbox_domains = example.org example.net paulsaunders.org.uk
Well, that was easy enough. Now, as I am going to be the only user on this domain, I’m going to have all addresses redirect to paul@paulsaunders.org.uk. So, add the following line to /etc/postfix/virtual:
@paulsaunders.org.uk paul@paulsaunders.org.uk
Then run postmap /etc/postfix/virtual to update the database.
Next up, I want to make sure dovecot is ready to receive mail. As I use virtual users, it’s a matter of adding paul@paulsaunders.org.uk to the database (which, for me is /etc/dovecot/passwd):
paul@paulsaunders.org.uk:{PLAIN}LetMeIn
Finally, in order that my machine can receive the mails destined for it, I need to update the DNS. Remember that, at this point Gandi are still hosting that for me. So, using their web tool, create a new version of the DNS Zone and adjust the “MX” records to read:
Name | Type | Value | Priority |
---|---|---|---|
mx | A | aaa.bbb.ccc.ddd | |
mx | AAAA | 2001:aaa::bbb:1 | |
@ | MX | mx.paulsaunders.org.uk. | 20 |
@ | MX | fb.mail.gandi.net. | 50 |
where the A and AAAA records point to the server running postfix. Press “use this version” to make the records active and then wait for around 3 hours (Gandi’s default TTL) before sending a test message.
Website
The blog is powered by wordpress which I already use on another of my sites. Converting this to Multisite mode (so that several, independent blogs can use the same WordPress installation) took a bit of work. I followed this excellent tutorial, which basically consisted of:
- Add the following before the server{} block:
map $http_host $blogid { default 0; example.org 1; paulsaunders.org.uk 2; }
- Switch WordPress to Multisite mode. This involves adding:
/* Multisite */ define('WP_ALLOW_MULTISITE', true);
to wp-config.php
-
Visit Tools > Network Setup and copy the first block of suggested code into wp-config.php
-
Install and configure the W3 Total Cache and WordPress MU Domain Mapping plugins.
-
Under Sites > All Sites, add a new site “paulsaunders.darac.org.uk” (which will send an email to the address we set up above). Under Settings > Domains, map paulsaunders.org.uk to the Site ID that has been assigned.
DNS
As a final step to making things “go live”, I moved the DNS to my own server. Firstly, I created a new Master Zone on my DNS server for paulsaunders.org.uk and copied the entries from Gandi. The way I would have preferred to do this would be to start with a slave zone and use an AXFR to copy the information from Gandi, but I couldn’t find a suitable server at Gandi to transfer from, so ended up adding the entries manually.
In addition to the entries Gandi show, I added the following entries:
Name | Type | Value |
---|---|---|
ns1 | A | aaa.bbb.ccc.ddd |
ns1 | AAAA | 2001:aaa::bbb:1 |
www | CNAME | paulsaunders.org.uk |
Next up, at the Gandi control panel, I went to “Glue Record Management” and entered the two IP addresses (v4 and v6) of ns1.paulsaunders.org.uk. This basically adds a record at the registrar’s servers (Nominet, in the case of .uk) of the IP of my name server. Without Glue, looking up a DNS record the first time goes like this:
- Client: “.”, I want www.paulsaunders.org.uk.
- “.” (The root name servers): I don’t know, try asking “.uk”.
- Client: “.uk”, I want www.paulsaunders.org.uk.
- “.uk”: I don’t know, try asking “.org.uk”.
- Client: “.org.uk”, I want www.paulsaunders.org.uk.
- “.org.uk”: I don’t know, but I know (courtesy of the SOA records) that that information is held by ns1.paulsaunders.org.uk.
- Client: “.org.uk”, I want ns1.paulsaunders.org.uk
- “.org.uk”: I don’t know, but I know that that information is held by ns1.paulsaunders.org.uk
- Client: …
But with glue, the latter part of that conversation goes:
- …
- “.uk”: I don’t know, try asking “.org.uk”.
- Client: “.org.uk”, I want www.paulsaunders.org.uk.
- “.org.uk”: I don’t know, but I know (courtesy of the SOA records) that that information is held by ns1.paulsaunders.org.uk. Additionally, I’ll let you know that ns1.paulsaunders.org.uk is at aaa.bbb.ccc.ddd and 2001:aaa::bbb:1.
- Client: 2001:aaa::bbb:1, I want www.paulsaunders.org.uk
- ns1.paulsaunders.org.uk: Certainly! Here it is!
Updating the glue record only takes a few seconds, so I next went to “Modify Servers” and entered “ns1.paulsaunders.org.uk” as DNS1 and “ns6.gandi.net” as DNS2. Allowing this information to propagate out takes a while (6 hours was advised), so sit back for a bit.
I’m not sure you actually need the cookie notification for the purposes you’re using them here. I’m no legal expert, but I suspect you’re using them in such a way where no consent is required (implicit or explicit), and so the warning could probably be removed to avoid annoying people. Just a thought.