5 months ago
Hi Railway Support,
I'm having an issue getting the www version of my domain to work properly.
My site: smartplaytools.com
Hosted on Railway using Next.js (App Router)
I’ve successfully connected the root domain (
smartplaytools.com) via a CNAME record pointing to my Railway app (4zwohehe.up.railway.app), and it works great.
I recently added a second CNAME record for www:
Host:
wwwValue: 4zwohehe.up.railway.app (same as root)
However, when visiting https://www.smartplaytools.com, the browser shows:
"This site can’t be reached – took too long to respond"
The non-www version (https://smartplaytools.com) loads fine.
I’ve confirmed:
The DNS records are correct (both
@andwwwpoint to the same Railway URL)The TTL has passed (waited over an hour)
I’ve redeployed my app after making changes
Could you please help me check:
Whether
www.smartplaytools.comis properly recognized and active in Railway’s system?If there’s any delay or issue on your end with routing traffic to the
wwwsubdomain?Whether anything needs to be configured differently for
wwwto work?
I also have middleware.js in place to redirect www → smartplaytools.com, but first I need the www domain to resolve so the redirect can trigger.
Any help would be greatly appreciated!
Best regards,
[Your Name]
Pinned Solution
5 months ago
In Railway, go to your app's Settings → Networking/Domains → click "Add Domain" and add www.smartplaytools.com as a separate domain entry. Railway needs both smartplaytools.com AND www.smartplaytools.com explicitly added in your service settings, even though both CNAME records point to the same Railway app - just having the DNS records isn't enough, Railway must recognize both domains in its configuration.
2 Replies
5 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
5 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 5 months ago
5 months ago
In Railway, go to your app's Settings → Networking/Domains → click "Add Domain" and add www.smartplaytools.com as a separate domain entry. Railway needs both smartplaytools.com AND www.smartplaytools.com explicitly added in your service settings, even though both CNAME records point to the same Railway app - just having the DNS records isn't enough, Railway must recognize both domains in its configuration.
Status changed to Solved brody • 5 months ago