Railway has added TXT records for creating custom domain
alipbudiman
HOBBYOP

a month ago

Railway has added TXT records for creating custom domain. How does this affect the CustomDomainCreate mechanism in the public API? Has there been any change to it, considering that previously it only required a CNAME record? This is important for me because several of my projects provision Railway services programmatically via the API.

Solved

10 Replies

alipbudiman
HOBBYOP

a month ago

N/A


a month ago

It should also now return a txt record that you would use.


alipbudiman
HOBBYOP

a month ago

it should be, but the return is only CNAME

WhatsApp_Image_2026-02-14_at_6.58.06_PM.jpeg

Attachments


a month ago

Does your mutation include an attribute for the TXT record


alipbudiman
HOBBYOP

a month ago

Thank you for the clarification.

Currently, my mutation does not include any additional attribute specifically for the TXT record in the input. I am only providing the required fields for customDomainCreate, and I have included dnsRecords in the selection set.

Since dnsRecords returns an array of DNS records, I expected the TXT record to be included there automatically, alongside the CNAME record. However, the response currently only returns the CNAME record.

Could you please confirm whether an additional input attribute is now required to generate or retrieve the TXT record?

image.png

Attachments


a month ago

Yes an additional attribute is required, you can check the GQL schema, but a quick way would just be to check what GQL query the frontend makes when you add a domain.


a month ago

For reference, the TXT dns records are a separate field inside status:

mutation {
  customDomainCreate {
    status {
      verificationToken # value
      verificationDnsHost # name
    }
  }
}

a month ago

Can agree that an extra item inside dnsRecords would be better but the team knows better probably.


alipbudiman
HOBBYOP

a month ago

thank you so much for information and help, btw i agree with you 🙏 😊


alipbudiman
HOBBYOP

a month ago

oke thanks


Status changed to Solved brody 27 days ago


Loading...