-1

I want to have my main app accessable at mydomain.com

From here I also want api.mydomain.com and staging.mydomain.com

I use DigitalOcean and Dokku, along with letsencrypt SSL

I have now sat up my main app at production.mydomain.com, can i redirect visitors to mydomain.com, from here?

How is this achievable?

Tarlen
  • 3,327
  • 6
  • 25
  • 50

1 Answers1

0

Make sure you add your domain (e.g. example.com) to your app:

dokku domains:add yourappname example.com 

Then in your app you can issue a redirect when people access it via production.example.com:

// ExpressJS
res.redirect(302, 'https://example.com');
malix
  • 3,427
  • 1
  • 27
  • 39