Railway IP for domain A record
johnlins
HOBBYOP

2 years ago

I am currently using a CNAME to point to Railway for a custom domain. However, doing this make it impossible to setup SPF records, so I need to use an A record or ALIAS instead. But what is the railway IP address that I need to use for this?

Closed

26 Replies

johnlins
HOBBYOP

2 years ago

3af4eb75-c9f3-4675-b813-0f3f3fc2b190


2 years ago

I am also in need of this for 1f7cc3a8-76f3-47c2-beba-2b5bb6e4e202


johnlins
HOBBYOP

2 years ago

For context^

1358565845437251747


2 years ago

Running a dig against the CNAME domain the setup instructions gives me (e.g. something.up.railway.app) yields this: ```❯❯ dig qt0utsxf.up.railway.app

; <<>> DiG 9.10.6 <<>> qt0utsxf.up.railway.app

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12971

;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:

; EDNS: version: 0, flags:; udp: 1232

;; QUESTION SECTION:

;qt0utsxf.up.railway.app. IN A

;; ANSWER SECTION:

qt0utsxf.up.railway.app. 60 IN CNAME edge.railway.app.

edge.railway.app. 300 IN A 66.33.22.2

edge.railway.app. 300 IN A 66.33.22.1

edge.railway.app. 300 IN A 66.33.22.4

edge.railway.app. 300 IN A 66.33.22.3

;; Query time: 33 msec

;; SERVER: 192.168.1.1#53(192.168.1.1)

;; WHEN: Sun Apr 06 18:16:05 EDT 2025

;; MSG SIZE rcvd: 135```


2 years ago

I'm going to test my app with those 66.33.22.* IPs as @ A records and see if that works


2 years ago

Unclear if they are static IPs, but that fact that edge.railway.app has A records to four of them seems promising


2 years ago

Aaaaand that does not work, yields an error due to the certificate not matching the domain

1358567121776541700


2 years ago

I've been loving Railway, but unfortunately if this is not possible I will need to switch providers.


2 years ago

This is a pretty huge restriction for anything other than hobby apps -- a little upset that "Custom Domain Support" is marketed when it's not actually supported fully.


johnlins
HOBBYOP

2 years ago

Are you sure it's not fully supported? That would be pretty insane, that means you can't even have a custom email address if the root domain is hosted on railway



2 years ago

They support CNAME flattening and ALIAS records, otherwise the docs say (unhelpfully) "just change your name servers!"


johnlins
HOBBYOP

2 years ago

Oh, can't we just use ALIAS then?


johnlins
HOBBYOP

2 years ago

That would enable us to use TXT records


2 years ago

You can if your DNS provider supports it


2 years ago

I'm not going to switch my DNS provider just because a PAAS product decided to not support the most straightforward DNS mechanism for domain redirection


2 years ago

The problem is that all the mechanisms Railway supports (CNAME flattening, ALIAS records) are not standard DNS features


2 years ago

So they are not guaranteed to work with all services.


johnlins
HOBBYOP

2 years ago

Ah I see


johnlins
HOBBYOP

2 years ago

That's so irritating


johnlins
HOBBYOP

2 years ago

Thanks


2 years ago

!s


Status changed to Solved brody • over 1 year ago


a year ago

You should be able to point your apex to 66.33.22.1 and it should work.


Status changed to Open Railway • over 1 year ago


phin

You should be able to point your apex to 66.33.22.1 and it should work.

dima-kov
HOBBY

a year ago

Hi, I need to set up SPF records for my domain but Railway assigns dynamic IPs on each deployment.

You mentioned pointing apex to 66.33.22.1 - does this static IP also apply to outgoing emails from my app, or is there another way to handle SPF with Railway's dynamic IPs?

Thanks!


a year ago

That IP is not used for outgoing traffic. For that, you would need to be on the Pro plan to enable static IPs.

https://docs.railway.com/reference/static-outbound-ips


brody

That IP is not used for outgoing traffic. For that, you would need to be on the Pro plan to enable static IPs. <https://docs.railway.com/reference/static-outbound-ips>

dima-kov
HOBBY

a year ago

but it seems impossible due to:

Caveats

  • There is no guarantee that the IPv4 address assigned to your service is dedicated. It may be shared with other customers.

so it's not safe


Welcome!

Sign in to your Railway account to join the conversation.

Loading...