is it possible to do a wildcard sub-domain
ralyodio
HOBBYOP

a month ago

ok got another one for you is it possible to do a wildcard sub-domain pointing to same app on railway? like *.example.com all goes to port 8080

34 Replies

a month ago

it is possible, and you do it the exact same way you did in your question, you just add your domain with a * as the subdomain, so adding *.example.com will add a wildcard subdomain to your service


ralyodio
HOBBYOP

a month ago

oh shit


ralyodio
HOBBYOP

a month ago

i've been adding www.example.com and example.com this whole time.


a month ago

it's probably better adding www and @ as their own domains though, because if in the future you want to add a cdn.example.com for example or whatever then it'll complicate things since you'll first need to decouple all subdomains from existing service


ralyodio
HOBBYOP

a month ago

oh wiat so i can'pt do * with cdn?


ralyodio
HOBBYOP

a month ago

that's a feature request for me lol


a month ago

you can, but not in a seperate service


ralyodio
HOBBYOP

a month ago

8'm letting people use .bl0ggers.com but i might need cdn.bl0ggers.com someday


a month ago

so let's say you have a seperate cdn service, or maybe a blog.example.com, if you want it to be a in a seperate service then you'd need to undo the wildcard subdomain because with a wildcard subdomain all subdomains are routed to the wildcard subdomain service


ralyodio
HOBBYOP

a month ago

oh i see


ralyodio
HOBBYOP

a month ago

so you can't do both


ralyodio
HOBBYOP

a month ago

unless they are on the same service


ralyodio
HOBBYOP

a month ago

thats' fine. i usually upt everything in docker on the same serivce


a month ago

actually nvm I'm wrong, you're probably fine


a month ago

you can have *.example.com and blog.example.com in a seperate service I think


a month ago

my bad


a month ago

I"D STILL argue it's better not to use wildcard subdomains if it's only for www and @ though but it shouldn't interfere in the way I said it would


ralyodio
HOBBYOP

a month ago

why is this not resolving https://bl0ggers.com/ but www is


a month ago

wildcard subdomains only match subdomains


a month ago

it wont match for the root domain


ralyodio
HOBBYOP

a month ago

so yoyur dns entries are wrong


a month ago

who's yoyur?


ralyodio
HOBBYOP

a month ago

your


a month ago

oh, how so?


ralyodio
HOBBYOP

a month ago

i assume you work at railway


a month ago

I'm just a moderator for the server and forums


ralyodio
HOBBYOP

a month ago

i have to add bl0ggers.com and *.bloggers.com i guess


a month ago

exactly, wildcard subdomains are only for subdomains


a month ago

(although personally, I'd recommend being explicit with what domains should route to your service unless you actually need a catch all, but thats just my recommendation)


ralyodio
HOBBYOP

a month ago

i do need a catchall like chovy.substack.com my bl0ggers page will be chovy.bl0ggers.com


a month ago

ohh okay, fair enough


a month ago

all clear to mark as solved?


a month ago

Funny.


a month ago

trying to catch up <:whyy:820544448798392330>


Welcome!

Sign in to your Railway account to join the conversation.

Loading...