R
Railway

✋|help

How to enable Email on Cloudflare

Kkeithb02269/3/2023
I have a React/NodeJS app running on Railway using a custom domain. Cloudflare DNS records have been added (CNAME) and deleted (root A record) to enable Cloudflare to proxy traffic to my site on Railway. This is working great but I now have no email.

The MX record on Cloudflare points to the domain wuther.au but because I removed the A record, this doesn't seem to work any more.

This must be a common issue but I can't find any solutions.

Does anyone here know how I might get my email working in this context?

Thanks.
Kkeithb02269/3/2023
06d0b2d6-0840-4e62-be7a-b060932f11e4
BBrody9/3/2023
i dont know what email servers you use, but i use zoho and my mx records point to mx.zoho.com
you would want to point your mx records to the mx values your email provider uses
Kkeithb02269/3/2023
Hi @Brody. Mine do but I think because I removed the A record that points to the same domain, email routing no longer works. Does that make sense?
BBrody9/3/2023
who's your email provider?
Kkeithb02269/3/2023
Hostgator
Cpanel account.
BBrody9/3/2023
do you host your own email on a hostgator server?
Kkeithb02269/3/2023
Yes
BBrody9/3/2023
https://www.hostgator.com/help/article/mail-exchange-record-what-to-put-for-your-mx-record#scenario2
i assume you would just set the mail.wuther.au record to the ip of your cpanel host
Kkeithb02269/3/2023
Thanks, I'll check it out...
Quick question... Do I make these changes at my domain registrar (i.e. where the nameservers point to Cloudflare)?
BBrody9/3/2023
no youd make them in cloudflare
Kkeithb02269/3/2023
I am not able to complete step 1 - add an A record. I get this message: "A CNAME record with that host already exists. "
BBrody9/3/2023
so then update the already existing record
Kkeithb02269/3/2023
Do you mean the CNAME that points to Railway? Sorry, I'm not very knowledgeable on this stuff.
BBrody9/3/2023
^
Kkeithb02269/3/2023
Oh, I understand now. I''l try that, thanks.
I get an error message: "Change the content of your MX record to be a hostname (and not an IP address)."
https://developers.cloudflare.com/dns/manage-dns-records/how-to/email-records/#add-mx-records
BBrody9/3/2023
yes so set mail.wuther.au to an a record, then set your mx record to mail.wuther.au
Kkeithb02269/3/2023
I can't seem to create an A record when the CNAME already exists on that domain. If I remove the CNAME, create the A Record it will work for email but then my app on Railway will not display.
BBrody9/3/2023
i am not saying to set an A record on the root domain, i am saying to set an A record for the mail subdomain
Kkeithb02269/3/2023
@Brody, you're a genius. Saved me a lot of time, thanks! I'm receiving email in my hostgator email account. Now I'll figure out how to connect via an email client as it's referencing mail.wuther.au. Cheers!
BBrody9/3/2023
awesome!
hostgator had tutorials for that stuff too btw, don't currently have the links on hand though
Kkeithb02269/3/2023
I'll find it, thanks!
BBrody9/3/2023
you're supposed to use that to mark the answer 🤣
Kkeithb02269/3/2023
OOPS!

Looking for more? Join the community!

Recommended Posts
Unused DatabaseHey, I have a backend talking to my express server. Both are hosted on Railway. The thing is I am noRun a command in production (rake)Hi there, newcomer from Heroku here — I need to run a command in my production environment (in this don't remember how to log in into my accountI need to access to my account to suspend something, but I faced this notification (in the picture) Run a daily rails rake script on cronHi I have an app that does a daily update to the data in the db. Currently using railway I run this typebot internal server errortypebot is experiencing internal server error. What is the solution?Internal Server ErrorI have this problem, i need helpSpringBoot with MySQL on railway setupHey I am learning SpringBoot and was working locally with a MySQL db set up(locally as well), and I Laravel: failed to build projectHello, I am new to Railway. I am trying to deploy laravel project from my github repo, which is a rePricing questioni got 10 eur in credits because that lowest i could go and got hobby plan 5 eur a month, but after mGithub being in privateHello, I'm having this return with my github being in private. [Evolution API] v1.5.0 1 - Sat Sep 02Yt-DlHey i recently just got railway n found out yt-dl is banned for some reason i just wanted to host mySSH to Wordpress instanceI would like to ssh to my wp instance volume to make changes to the source code there. Is there way Add search to Postgres TableViewI have a problem, big table and I need change some rows but can't find it and update without sql reqDoes anyone know what the procfile command should be for Django Daphne?I'm trying to move from wsgi to asgi in Django and not sure what the procfile command should be. I'Does anyone know what the procfile should be for daphne?I'm trying to move from wsgi to asgi in Django and not sure what the procfile command should be. I'No data is being written to the fileHi all. When I start my telegram bot, I log messages. All messages are written to a text document. WBuild failed but not sure whyHi! I'm trying to understand why my build failed, and I can't discern any errors in the logs. Here'sOne service is unable to connect to Postgres container, while the other connects fineHi, I have two typescript services and a postgres service in a project. One of the typescript servicGo Deploy Gone WrongHey all, need a sanity check on a failing deploy. I am able to build and run my app locally just finNeed Help with Discord BotThe bot uses chatgpt and play.ht to generate text, and then read the text in a discord server. When