A Quick Note on ccTLDs

In a previous blog post, I talked about how hard it was to get a good domain and how stupid it was that gTLDs like .creditcard now exists.

My friend Hayden posted a comment on that post about ccTLDs and how some smaller countries allow registrations across the world, eg .io, .cc, .pw, .tv.

A few days after that post, I registered two domains with the .pm ccTLD: salut.pm and eml.pm.

.pm is the ccTLD for a small island near Canada that is a French ‘oversees territory’. All citizens of the EU, EEA, and Switzerland are allowed to register these, although the Australian government managed to register aus.pm and, shockingly, Australia is not in the EU – this leads me to think that the registration rules aren’t really enforced.

My domains costed £8.50 from OVH using he .pm ccTLD, but smaller islands often have massive renewal costs – we’re talking £40 for .io or .tv.

Whilst ccTLDs can be attractive, you must remember the massive risk that comes with setting yourself up with one. Research the country – check it’s stable. Also aim to go for a democratic country. Countries such as Libya who own .ly have been known to take domains down that do not follow their strict laws on, for example, homosexuality.

Domains Are a Mess

On the 1st January, 1985, the world was forever changed. The .com domain was introduced, along with all the other original domains – .com; .edu; .net; .gov; .mil; .int.

Since the mid ’80s, the world-wide-web (WWW) has grown massively, not just in users, but the amount of domains registered.

The first domain to ever be registered by a private citizen was broken.net, by someone called Jason. To this day, Jason owns that domain, using it for email.

Jason was lucky. Jason got a damn good domain. The rest of us, well, we aren’t so lucky. I’ve owned domains ever since I’ve had a debit card and have been able to register them, I’ve never lived in a world where many good domains have been available; and those that are are snatched up within 1-millisecond by the bots of GoDaddy or DAN.com.

The best domain I own is jac0b.net. Ouch. Don’t get me wrong, I really do like my domain, but having to swap an o for a 0 is… well… yeah. I own a lot of domains, around 24, among them is jacobsammon.com – which I use for a lot of back-end stuff and for email, but I’d have much preferred jacobsa.com or jacobsa.net; both are owned by the same person and have no content – not even a DNS record.

Anyway, people like me are forced to get longer and longer domains with every passing year if we want a .com, .net, .org, or other highly used TLD.

ICANN, the non-profit responsible for everything domain related, started to recognise this issue in around 2007. ICANN opted to allow companies to bid on proposed gTLDs (generic top-level-domains). Since then, thousands of domains have become available; you can see a list of them on Wikipedia.

These, to put it mildly, are awful. Some are OK, .xyz, .blog, .app, .codes, .art, .news.

Most are awful. .domains, .online, .email (should be .eml), .accountant, .black (which, I am not joking, is for “those who like the colour black”), .christmas, .cyou.

I mean, c’mon, .cyou. What idiot came up with that? I read the company that runs the registry’s website and it said it’s for “GEN X”. Cool.

I don’t know what the solution to the domain problem is. But maybe it’s to have short, logical, recognisable new gTLDs that people’ll actually want, and not whatever .spreadbetting is.

ICANN needs to seriously rethink their entire strategy on gTLDs. The people at ICANN don’t realise the scope of the issue – most of them have had domains since the ’90s.

PS, good luck even getting a good new gTLD. The best one that someone that I know owns is hn.fyi, but Hayden got very lucky with his!

The Way Email Was Meant to Be

Email was not supposed to be how it is today. Not at all. Gmail, Yahoo, Outlook/Hotmail, AOL, iCloud; just a few companies control so much of the worlds communications by email.

In an ideal world, we’d all have our own email servers, or maybe our family would. We’d all have nice email addresses that don’t end in the same old @gmail.com or @outlook.com. They’d be short, personalised, and recognisable; at our own domain.

Each institution, whether that be schools, employers, governments, or who/whatever else would have their own email server, running on open-source, secure software, and not just sign up to a service like Office 365 or gSuite, with a domain registered with Google or GoDaddy.

But instead, we have big companies who scan through billions of terabytes of email and display personalised advertisements, often through the poor quality webmail clients they require you to use.

Even those of us who run our own servers, manage our own inboxes, use our favourite open-source clients are subjected to Gmail and big email companies. Our friends, family, and colleges use Gmail, and Outlook, and Yahoo, so inevitably our emails end up of their servers anyway. I found this amazing blog post on this very issue; I recommend you take a look.

Personally, I am forced to use Outlook. My school uses Office 365, meaning that if I want to communicate with staff, I get the option of Outlook or Teams. Teams is awful software; I always choose Outlook. I’m fairly certain my school would be mortified if I started emailing staff from edu@jacobsammon.com, or something like that.

But whenever I can, I use my personal email server. Don’t get me wrong, I have a Gmail account. I’ve had a Gmail account since I was 9, and before that an @btinternet.com address since I was 6 (my Dad set it up for me). But, on holiday one year, I bought a Namecheap hosting package and setup the email jake@jakesammon.com, soon, on the same hosting package, I setup jacob@jacobsammon.com, and that’s been my address ever since.

I don’t use Namecheap and cPanel anymore though, I run Dovecot, Postfix, and SpamAssassin off of my Ubuntu 18.04 VPS (virtual private server). I use BIND for DNS and PorkBun is my registrar, the entire config only costs me around £5/month. I actually setup my entire email server using Luke Smith‘s emailwiz script. Luke is an… interesting character, and whilst I don’t agree with quite a few of his opinions, he made a great piece of software.

The reason I keep open my Gmail account is mainly because I sort-of have to. I own a lot, and I mean a lot, of domains, and I register most of them with PorkBun (they’re an amazing registrar, and even sent me a free hoodie), but PorkBun requires that I keep an email address attached to my account… the account that has jacobsammon.com, the domain I use all of my email for, attached to it. You can see the issue here.

My point is, big companies having all of your emails is bad. If you have the technical know-how, configure your own email server. Don’t get an address with ProtonMail or anything like that. Don’t get me wrong, they’re better than Gmail etc, but it’s still a company with all your emails on their server that just promises to respect your privacy, oh, and you pay for ProtonMail too, and far much more than with a basic VPS plan.

If you’re looking for a VPS plan to get started with, take a look at Contabo‘s plans, they’re cheap and work fine – I use them. Linode and Vultr are probably fine too, just check their privacy record before you buy. But don’t use Google Cloud or some big tech company’s VPS service.

The internet was designed to be a place where everyone got there own section, you should support the idea of internet, and not let a few companies run it covered in ads and collecting your data.

Hello World

Welcome to my new blog! Formerly, this blog was at jacobsammon.com, but I’ve decided to move over here to represent a new start, with different content and a website that priorities simplicity.

I intend to write about whatever I care to. Mostly tech I’m guessing. Maybe some politics, though I try and keep that off the internet.

I might be uploading a few of my old posts from my old blog over the next few days, I’ll try and make it clear these are from whenever they’re from. My last post on that blog was September 15, 2020.

How to Make a Super-Cheap CDN

If you run a site and want to speed it up, a content delivery network (CDN) can be a great option. Today, I’m going to explain my cheap and cheerful solution using Cloudflare, an 80p/year (including renewal) domain, and Apache – and show you how to implement your own.

Basically, Cloudflare takes the files I store on my CDN and caches them on servers across the world – from Europe to North America, Asia to Australia. Cloudflare also does some neat stuff like offering free SSL certificates and a nice DNS management console.

The Domain

You’re going to want to navigate over to gen.xyz and register a 6 to 9 number long .XYZ domain. These domains only cost $0.99 to buy and renew – they’re great value for this sort of stuff.

Cloudflare Setup

Now we need to add our new domain to Cloudflare. Navigate to dash.cloudflare.com, and login or sign up. When you’ve verified your email, you’ll be able to add a domain.

Hit add a new domain and walk through the steps.

Choose the free plan – we don’t need anything more!

Now Cloudflare’s going to ask us to change our nameservers. These are different for everyone (sort of), but generally follow the rule of name.ns.cloudflare.com – eg bob.ns.cloudflare.com. Add the two records they add you to ask by navigating to gen.xyz/account/clientarea.php.

Once you’re at the gen.xyz client area, hit manage next to your new domain, then scroll down to nameservers and enter the nameservers that Cloudflare gave you – hit save.

It normally takes about 15 minutes for the nameservers to update. Cloudflare will email you when they’re updated.

Adding DNS Records

It’s more or less smooth sailing from here! Open dash.cloudflare.com and click on your new domain. Now press on DNS in the top nav-bar. You’ll need to add your server’s IPV4 and/or IPV6 address(s) now on the “Name” (subdomain) cdn.

Adding the IPV4 address:

Adding the IPV6 address:

If you added both IPV6 and IPV4, your configuration will look like this:

This is very important: navigate to SSL/TLS at the top and change your SSL setting from Flexible to Full.

Server Side

Now all we really need to do is add a virtualhost to make the CDN work.

Login to your server and run the following command:

sudo nano /etc/apache2/sites-available/cdn.conf

Now, use my VirtualHost generator to make your virtualhost. Just enter cdn.YOURDOMAIN.xyz as the domain (replace YOURDOMAIN with, shockingly, your domain), and /var/www/cdn as the directory.

Next, paste the results after pressing generate into cdn.conf – you can remove the last two parts that are www.cdn.YOURDOMAIN.xyz (port 80) and www.cdn.YOURDOMAIN.xyz (port 443) or leave them, we aren’t resolving them either way.

Hit CTRL + X and then press Y.

Now run the following commands:

sudo a2ensite cdn.YOURDOMAIN.xyz
sudo systemctl reload apache2

Finally, we just need to add an SSL cerificate to the domain, run this:

 sudo certbot --apache --redirect -d cdn.YOURDOMAIN.xyz

Adding Content

That’s it. Sorted. Now just upload your CSS, JavaScript, images, videos, audio, and whatever else you’d like to your CDN and it’ll work.

Finishing Notes

Whenever you’re updating existing files, turn on development move in Cloudflare, it’ll save you a huge headache.

I recommend you turn off indexing of files, to do this, create a .htaccess file in your CDN’s folder (where you put all the content) and add this:

Options -Indexes

This post has been back-dated to this blog. I’m not sure quite when it was first released, but 080820.xyz was registered on 11 December, 2020, so that’s a pretty good bet.