www domain won't redirect to @ domain
petermeinders
HOBBYOP

8 days ago

www.firesidearcade.com does not redirect to firesidearcade.com even though i've made the forward happen in my Squarespace domain and followed all instructions on how to do it.

Solved$10 Bounty

2 Replies

Railway
BOT

8 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 8 days ago


stewiezgaming-web
HOBBYTop 10% Contributor

4 days ago

Railway doesn't do domain-level redirects itself — a domain either routes to your service or it doesn't (docs) — and Squarespace's domain forwarding generally can't forward the www subdomain while the apex is pointed at an external host, which is why your forward isn't taking effect.

Two ways to fix it, pick one:

Option A — handle it in your app (simplest with Squarespace DNS):

In Railway, add www.firesidearcade.com as a second custom domain on the same service (Hobby allows 2 custom domains per service).

In Squarespace DNS, add the CNAME + TXT records Railway shows you for the www domain.

In your app, 301-redirect any request whose Host header is www.firesidearcade.com to https://firesidearcade.com. In Express, for example:

jsapp.use((req, res, next) => {

if (req.hostname === "www.firesidearcade.com")

return res.redirect(301, "https://firesidearcade.com" + req.originalUrl);

next();

});

Option B — move DNS to Cloudflare (free) and use a Bulk Redirect: point your nameservers at Cloudflare, CNAME the apex to your Railway target (orange-cloud proxied, SSL mode Full, not Full Strict), then create a Bulk Redirect https://www.firesidearcade.comhttps://firesidearcade.com (301). This is Railway's documented approach: https://docs.railway.com/networking/domains/working-with-domains#adding-a-root-domain-with-www-subdomain-to-cloudflare

One check worth doing first: run dig www.firesidearcade.com — if the www record currently points at Squarespace's forwarding servers but you never completed forwarding setup for the subdomain, you'll see it immediately.


Status changed to Solved petermeinders 3 days ago


petermeinders
HOBBYOP

3 days ago

This was the solution:

"I checked DNS/HTTP live. The redirect is backwards because the root and www are split: firesidearcade.com still points to Squarespace A records: 198.49.23.145, 198.185.159.144, 198.49.23.144, 198.185.159.145 www.firesidearcade.com is CNAME -> epbwuq3s.up.railway.app Also, https://firesidearcade.com currently 301s to http://www.firesidearcade.com, then Railway sends www to https://www.firesidearcade.com. Fix: add both firesidearcade.com and www.firesidearcade.com to the Railway service, remove the Squarespace apex A records, point the apex/root to Railway using Squarespace root CNAME flattening/ALIAS/ANAME, and keep www as the Railway CNAME. Then set the canonical redirect on Railway."


Status changed to Awaiting Railway Response Railway 3 days ago


Status changed to Solved petermeinders 3 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...