Public | Automated Build

Last pushed: 2 years ago
Short Description
This container uses nginx to redirect from a bare domain name to the www equivalent.
Full Description

www-redirect : A simple solution to converting bare domains -> www

This container solves a singular problem: How do you redirect users to your hostname when it is CNAME'd to an external service? Especially when the DNS holding your A record doesn't support redirects.

Behold! A lightweight solution using nginx that you can stand up anywhere you can run a docker container.


Simply pass the environment variable like so:

docker run -e "" -dt ilkelma/www-redirect

Configurable environment variables

  • REDIRECT_HOST This is the A record hostname so host + TLD ex: Default: (best to change that as above)
  • REDIRECT_SUBDOMAIN This the subdomain (including the final .) so www. for Default: www.

Known limitations

No support is given here for SSL. That's out of scope for the simple lightweight set up desired. Please feel free to fork this repo and add your SSL certs to it (in private obviously).


  • [ ] Add env variable for port
  • [ ] Add env variable for redirect
Docker Pull Command
Source Repository