This Docker image helps you start your own apex/root to www redirecting HTTP/S server. Basically, this is your own self-hosted alternative to the redirect.pizza web service.
When Docker is installed, run this:
docker run --name apex2www --detach \
--restart=always --publish 80:80 --publish 443:443 \
yegor256/apex2www
Now you can point A
DNS record of your domain to the IP address of the
server where the Docker container is running. Once an HTTP/S request arrives,
it will automatically be redirected to the www.
hostname.