Help with www subdomain not working despite CNAME setup
pgabeojo
HOBBYOP

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:

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 @ and www point 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:

  1. Whether www.smartplaytools.com is properly recognized and active in Railway’s system?

  2. If there’s any delay or issue on your end with routing traffic to the www subdomain?

  3. Whether anything needs to be configured differently for www to work?

I also have middleware.js in place to redirect wwwsmartplaytools.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]

Solved$10 Bounty

Pinned Solution

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

Railway
BOT

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!


brody
EMPLOYEE

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


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


Loading...