Goodbye, Squarespace! Hello, Porkbun!

Google Domains announced in July of 2023 that the service would be shut down and domains would be transferred to Squarespace. I thought it would be a good idea to not bother transferring the domains over to another registrar (and save money). Well, it was a mistake...

First and foremost, Squarespace has a huge dark pattern where they take at least 24 hours to send you the transfer code. Yes, one entire day to send an e-mail and you might still not get your code! Also, it seems like they do not support wildcard subdomains nor have an API to help you setup subdomains in that case. I had to manually create every single subdomain on the UI, and I can tell you it wasn't a good experience...

Now, after two weeks migrating the domains over, I'm using Porkbun as the domain registrar for all them. It offers all features I used in Google Domains and Just Works™️! Having an API to manage the domains gives me the opportunity to use Caddy to take care of serving and generating certificates on demand for this website.

Here's the configuration I'm currently using to serve this website:

(logging) {
	log {
		output file /var/log/caddy/access.log
		format json
	}
}

(mataroa) {
	route {
		file_server /static/* {
			root /srv/mataroa
		}
		reverse_proxy mataroa:8000
	}
        encode zstd gzip
}

{
	on_demand_tls {
		ask https://capivaras.dev/accounts/domain/
	}
}

*.capivaras.dev, capivaras.dev {
	import logging
	import mataroa

	tls {
	        dns porkbun {
		        api_key <KEY>
			api_secret_key <SECRET>
	        }
	}
}

:443 {
	import logging
	import mataroa

	tls {
		on_demand
	}
}