Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom domain for Preview Deployments #393

Open
thomaslenaour opened this issue Mar 12, 2024 · 1 comment
Open

Use custom domain for Preview Deployments #393

thomaslenaour opened this issue Mar 12, 2024 · 1 comment

Comments

@thomaslenaour
Copy link

Hello, is it possible to use a custom domain for preview deployments ? I'm having trouble configuring this.

Here is what I want to do:

Preview Deployments

Domain : preview.mydomain.com
Visit preview.mydomain.com then see Home Page.
Visit app.preview.mydomain.com then see App.
Visit {ORGANIZATION}.preview.mydomain.com then see the specific organization page.

Production Deployments

Domain : mydomain.com
Visit mydomain.com then see Home Page.
Visit app.mydomain.com then see App.
Visit {ORGANIZATION}.mydomain.com then see the specific organization page.

Has anyone managed to make it work like this?

Thanks in advance!

@Xennis
Copy link

Xennis commented May 19, 2024

Yes, that works without any issue. What's your error that you get?

My domain config:

  • www.preview.mydomain.app redirects (308) to preview.mydomain.app
  • *.preview.mydomain.app is assigned to my branch preview
  • preview.mydomain.app is assigned to my branch preview

My env config:

  • NEXT_PUBLIC_ROOT_DOMAIN=preview.mydomain.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants