ssl problem
mdcramer
FREEOP

a month ago

Bothmymemochat.com and www.mymemochat.com point to 151.101.2.15 .

mymemochat.com works fine with a valid SSL cert but www.mymemochat.com shows an SSL warning despite pointing to the same IP. I think you're going to say that I should use CNAME and point to melawgjr.up.railway.app but Inmotion Hosting does not allow a CNAME for the root. ANAME and ALIAS are also not available. Any suggestions on how to fix this?

Solved$10 Bounty

Pinned Solution

Railway does not support using A records, only CNAME is supported.

If your provider does not support CNAME flattening (using CNAME on root records), I could suggest migrating to Cloudflare's DNS service.

15 Replies

Status changed to Open Railway about 1 month ago


Railway does not support using A records, only CNAME is supported.

If your provider does not support CNAME flattening (using CNAME on root records), I could suggest migrating to Cloudflare's DNS service.


mdcramer
FREEOP

a month ago

OK, thank you for the very fast reply! By the way, the Railway chatbot suggested that I use the IP addresses.


mdcramer

OK, thank you for the very fast reply! By the way, the Railway chatbot suggested that I use the IP addresses.

I'll let the team know about this issue. Thanks!


Status changed to Solved 0x5b62656e5d about 1 month ago


mdcramer
FREEOP

a month ago

I created a Cloudflare account, set up the DNS using CNAME @, and updated the name servers. Unfortunately, the behavior hasn't changed. https://www.mymemochat.com still does not resolve. If I take off the www it works. Any other suggestions?


Status changed to Awaiting Railway Response Railway about 1 month ago


I'd try removing all associated records from Railway and Cloudflare, waiting for ~10-15 mins, then re-add the records back.


mdcramer
FREEOP

a month ago

Thank you for the very fast reply. I now see my dashboard has 'Cloudflare proxy detected' link. I clicked it, authorized the change (it offered to update two records and delete a duplicate) but it's still now working after ~30min. I can go into Cloudflare and delete the 2 Railway records, but what do you mean by removing all associated records from Railway? How would I do that?


Removing the custom domains from Railway is what I meant. Sorry for the confusion.


mdcramer
FREEOP

a month ago

Thank you. This is frustrating. I deleted the records from Cloudflare, removed the custom domain from Railway, waited ~15min and then re-added the custom domain (I just put "mymemochat.com") in Railway. It detected Cloudflare and so I let it automatically connect to update (which is very cool). The Cloudflare DNS records were updated and the dashboard now shows a cloud icon, which I assume means that it's working. The behavior, however, hasn't changed. ipconfig /flushdns didn't help. Any ideas?


mdcramer
FREEOP

a month ago

As an experiment I added a "www" CNAME to Cloudflare and pointed it at qs1xmj7t.up.railway.app. Interestingly, https://www.mymemochat.com/ is now giving a 404. I'll try pointing it at mymemochat.com instead.


mdcramer
FREEOP

a month ago

Nope. Still getting a 404. I'm just guessing at this point. I don't know how to fix this.


mdcramer
FREEOP

a month ago

This is what the Railway AI is saying. I'm not trusting this because qs1xmj7t.up.railway.app was configured automatically when I connected to Cloudflare. Could the issue be that I have 2 'web-production' URLs? I'm not sure how that happened. Should I delete one of them? Should I follow the AI's suggestion? Thanks to whoever can give me a hand.

---

Now I see the real issue. You have three different Railway domains involved:

  1. web-production-2a4e7.up.railway.app
  2. web-production-9c846.up.railway.app
  3. qs1xmj7t.up.railway.app (the one you're pointing your CNAME to)

Your service is only listening on the first two, not on qs1xmj7t.up.railway.app. That's why you're getting 404s.

The fix: Point your Cloudflare CNAME records to one of the domains your service actually has configured. Use either:

  • web-production-2a4e7.up.railway.app, or
  • web-production-9c846.up.railway.app

Update your Cloudflare DNS:

  • @ (apex) → point to web-production-2a4e7.up.railway.app
  • www → point to web-production-2a4e7.up.railway.app

Then test both domains. That should resolve the 404s.


mdcramer
FREEOP

a month ago

I removed the www CNAME in the Cloudflare DNS. Chrome now gives me "The site can't be reached" with DNS_PROBE_FINISHED_NXDOMAIN. Firefox gives me "Server not found."


mdcramer
FREEOP

a month ago

I just read this on https://docs.railway.com/networking/domains/working-with-domains#important-considerations: "The Trial Plan is limited to 1 custom domain. It is therefore not possible to use both yourdomain.com and www.yourdomain.com as these are considered two distinct custom domains." If I'm reading this correctly, that would mean that what I'm trying to do is not possible. It would also mean that Cloudflare wasn't necessary. It's in the docs but I feel like this could have been more clearly explained. I'll stop trying to get this to work until I upgrade to Hobby.


You can use Cloudflare networking rules to route www traffic to @.

Also, I can't find a CNAME record that either of your domains is pointing to...


mdcramer
FREEOP

a month ago

Thank you for following up! I'm not sure what you mean by, "... a CNAME record that either of your domains is pointing to," but here are my CNAME records on Cloudflare:

CNAME ftp - mymemochat.com Proxied Auto

CNAME mymemochat.com - qs1xmj7t.up.railway.app Proxied Auto

CNAME smtp - mymemochat.com Proxied Auto

Anyway, I set up the redirect at Cloudflare (they have a template so it was just a few clicks)... and it works! Thank you for all the help. My apologies if this was all documented somewhere but I was hoping the AI bot would get me there. This ticket can be close.


Status changed to Solved Railway about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...