Multiple Domains
Since Sliplane currently doesn’t support multiple custom domains on a single service, you’ll need a separate redirect service if you want to handle both example.com
and www.example.com
. This guide shows you how to set up a simple NGINX-based redirect service.
Prerequisites
- A Sliplane account
- A service with a custom domain setup (example.com in this case)
Setting up the Redirect Service
Create a new Dockerfile
:
Create an nginx.conf
file:
Replace www.example.com
and example.com
with your domains.
Push both files to any Github repository.
Deploy the service to Sliplane:
- Create a new service
- Set PORT environment variable to 80
- Set the custom domain to your www domain (e.g.,
www.example.com
)
Now, when users visit your www domain, they will be automatically redirected to your apex domain while preserving the path and query parameters.