verification link
Deployment webapp is providing verification links using the original .fly.dev URL that fly.io provides rather than my assigned url (e.g. mywebsite.com) - despite mywebsite.com working everywhere else.
How do i change it so the email verification links start with mywebsite.com rather than the .fly.dev URL?
It's not the biggest problem in the world but it is exposing the uglier fly.dev URL to users and it makes CORS more complex.
4 Replies
Hi @I’m not kidding. 🇵🇸🇮🇱. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To ensure that email verification links use your custom domain (e.g., mywebsite.com) instead of the default .fly.dev URL, you need to update the WASP_WEB_CLIENT_URL environment variable for your server deployment. This variable tells Wasp which URL to use when generating links for things like email verification.
Here’s how you can do it:
1. Set your custom domain as WASP_WEB_CLIENT_URL
Run the following command, replacing mywebsite.com with your actual domain: This ensures that all generated links (including verification links) will use your custom domain instead of the .fly.dev URL. 2. Why this works:
Wasp uses the WASP_WEB_CLIENT_URL environment variable to configure CORS and to generate URLs for actions like email verification. If this variable is set to the .fly.dev URL, that’s what will appear in your emails. Setting it to your custom domain updates all generated links accordingly. 3. Double-check DNS and SSL:
Make sure your DNS records are correctly set up and that your custom domain is properly configured with Fly.io, as described in the deployment docs. This ensures your app is accessible at your custom domain and that SSL certificates are valid. For more details, see the official documentation: Using a Custom Domain For Your App. If you’ve already set WASP_WEB_CLIENT_URL to your custom domain and are still seeing the .fly.dev URL in verification links, try redeploying your server to ensure the new environment variable is picked up. Let me know if you need more help! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @I’m not kidding. 🇵🇸🇮🇱, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
Run the following command, replacing mywebsite.com with your actual domain: This ensures that all generated links (including verification links) will use your custom domain instead of the .fly.dev URL. 2. Why this works:
Wasp uses the WASP_WEB_CLIENT_URL environment variable to configure CORS and to generate URLs for actions like email verification. If this variable is set to the .fly.dev URL, that’s what will appear in your emails. Setting it to your custom domain updates all generated links accordingly. 3. Double-check DNS and SSL:
Make sure your DNS records are correctly set up and that your custom domain is properly configured with Fly.io, as described in the deployment docs. This ensures your app is accessible at your custom domain and that SSL certificates are valid. For more details, see the official documentation: Using a Custom Domain For Your App. If you’ve already set WASP_WEB_CLIENT_URL to your custom domain and are still seeing the .fly.dev URL in verification links, try redeploying your server to ensure the new environment variable is picked up. Let me know if you need more help! ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @I’m not kidding. 🇵🇸🇮🇱, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
that fixed it you're the goat @kapa.ai
Let me check the knowledge base for you again. One moment! :books:
----------------------
I'm glad to hear that fixed it! 🎉 Setting the
WASP_WEB_CLIENT_URL
environment variable to your custom domain is the documented way to ensure all generated links (like email verification) use your preferred URL, not the default .fly.dev
address. This approach is recommended in the Wasp deployment documentation for custom domains on Fly.io, and it also helps keep your CORS configuration correct and your app looking professional to users Using a Custom Domain For Your App.
If you have any more questions about Wasp, feel free to ask!
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @I’m not kidding. 🇵🇸🇮🇱, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?Cool so you just forget to set the
WASP_WEB_CLIENT_URL
env var @I’m not kidding. 🇵🇸🇮🇱 ?