2 CNAMEs from domain to Railway, ANAME to subdomain
shxkm
HOBBYOP

2 years ago

I've the following setup:

sub.mydomain.com -> railway

mydomain.com -> railway

Both work properly and railway reports they're fine.

But I've also configured an ALIAS record from myOtherDomain.com -> sub.mydomain.com. Unfortunately, that doesn't seem to work. With dig myOtherDomain.com, I can see an IP from Google, which I assume is GCP. Am I missing something?

Solved

32 Replies

shxkm
HOBBYOP

2 years ago

2 CNAMEs from domain to Railway, ALIAS to subdomain


shxkm
HOBBYOP

2 years ago

1b0d51d3-f173-4fd6-bf29-f0025eae2d1a


shxkm
HOBBYOP

2 years ago

Actually, from a fresh machine it does seem to be redirecting but is giving a privacy warning. Is this a limitation from Railway’s side?


shxkm
HOBBYOP

2 years ago

The error is gone, but now I get Railway’s Not Found page.

Must Railway know of all domains that point to my domains? If I have an ALIAS from OtherDomain.com to sub.mydomain.com (registered with railway), do I also need to provision OtherDomain.com at Railway?


2 years ago

you need to use a CNAME, and yes the domain does have to be added to the applicable service


shxkm
HOBBYOP

2 years ago

Does Railway support A records at all? I may have a use case where customer provided domains may need to point to my own server.


2 years ago

we only support CNAMEs, sorry


shxkm
HOBBYOP

2 years ago

Any workarounds you can think of for this case?


2 years ago

you add their domain to your service and give them the CNAME to set


shxkm
HOBBYOP

2 years ago

That’s not gonna be very scalable. Anything else I can do here? (BTW: last time we corresponded you weren’t at Railway, congrats on the new role)


2 years ago

You can use Cloudflare's to manage your domains, and then you can use a snippet to overwrite the host header so that you only need one domain on Railway, requires Cloudflare Pro though


shxkm
HOBBYOP

2 years ago

Thanks. Got any pointers?


2 years ago

honestly I forgot what the offering from them is called to make it happen


shxkm
HOBBYOP

2 years ago

What about using nginx as a reverse proxy?


2 years ago

that won't work, you'd need to have the domain in railway still since we do host based routing


shxkm
HOBBYOP

2 years ago

Even if this proxy is hosted outside of railway?


2 years ago

oh then yes it could work


2 years ago

but if you're going that route, use caddy


shxkm
HOBBYOP

2 years ago

I mean customers would point to the proxy, proxy to railway


2 years ago

yeah you can do that, or you can do it with Cloudflare, I'd definitely go the Cloudflare route


shxkm
HOBBYOP

2 years ago

With workers? Because host rewriting is available in the ENTERPRISE plan


2 years ago

you can do host rewriting with snippets on pro


2 years ago

not using workers


shxkm
HOBBYOP

2 years ago

Got it. $25/mo is a bit much for this MVP. If I go the caddy route, I can only host it outside of Railway?


2 years ago

wouldn't you bake that price into the price you pass onto your customers?


shxkm
HOBBYOP

2 years ago

For sure. But I’d like to do this with CF only after a customer actually wants (pays) for it.


2 years ago

fair enough


2 years ago

caddy it is


shxkm
HOBBYOP

2 years ago

Must it be outside of Railway though?


2 years ago

yes, somewhere that doesn't do host based routing


shxkm
HOBBYOP

2 years ago

🙏


2 years ago

!s


Status changed to Solved brody over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...