How do I find my server's IP address?
caseyocampo
HOBBYOP

a year ago

I want to add an A record to my domain's DNS.

Project ID: 2bc9c54d-9d03-4621-a84d-431be23bd107

Region (if that matters): US East, Verginia, USA

Solved$10 Bounty

Pinned Solution

caseyocampo
HOBBYOP

a year ago

UPDATE: I was able to get the redirect to work in Namecheap.

Go to Namecheap Dashboard > Domain List > Manage (next to your domain name)

Scroll to Redirect Domain, then enter "www.yourdomain.com" in Source URL and "https://yourdomain.com" in Destination URL.

Select the green check mark to save changes.

Example in the screenshot as well.

22 Replies

a year ago

Why do you want to add an A record to your DNS?


caseyocampo
HOBBYOP

a year ago

To add a redirect for "www.mydomain.com". Currently, my site is only viewable at "https://mydomain.com".


a year ago

you can add more than one custom domain if you're still looking for www support (which seems unnecesary in modern age)


a year ago

Or you can redirect to your main domain at the DNS level

It's not recommended to use IPs cause the IP can change between deployments


caseyocampo
HOBBYOP

a year ago

I think I need to upgrade to the hobby plan for that. Right now I only have my “example.com” active in Railway and it says I’ve run out of custom domains. I wanted to add “www.example.com” because when users enter “www.example.com” vs “example.com” the website can’t be reached.


caseyocampo
HOBBYOP

a year ago

I did try adding a redirect in my Namecheap cPanel but that hasn’t worked 🙃


a year ago

namecheap's redirect records don't work that way unfortunately

I'm also on namecheap, and I ended up just using domain-forward.com

its been working pretty nicely thus far


caseyocampo
HOBBYOP

a year ago

So your domain is accessible at “www” and the base domain? If so, are there any docs available for setting that up?


a year ago

It depends on the method you're using

  1. You can do what Thalles suggested and add the www domain to your Railway service too so that it supports both, in this case you can find docs for that here:
  2. You can forward traffic from www to your main domain by using something like a DNS level redirect or domain-forward.com, I don't think Railway has docs for this because this is not strictly related to Railway

caseyocampo
HOBBYOP

a year ago

For option 1, it says I've hit the custom domain limit for your plan. I'll try to figure out how to forward traffic in Namecheap. There isn't anything Forward specific in the cPanel options so I'll tinker in the DNS settings. Thank you for your help.

Attachments


a year ago

Alright, and no problem

good luck 🫡


caseyocampo
HOBBYOP

a year ago

UPDATE: I was able to get the redirect to work in Namecheap.

Go to Namecheap Dashboard > Domain List > Manage (next to your domain name)

Scroll to Redirect Domain, then enter "www.yourdomain.com" in Source URL and "https://yourdomain.com" in Destination URL.

Select the green check mark to save changes.

Example in the screenshot as well.


caseyocampo

UPDATE: I was able to get the redirect to work in Namecheap. Go to Namecheap Dashboard > Domain List > Manage (next to your domain name) Scroll to Redirect Domain, then enter "www.yourdomain.com" in Source URL and "[https://yourdomain.com](https://gettallypad.com/)" in Destination URL. Select the green check mark to save changes. Example in the screenshot as well.

caseyocampo
HOBBYOP

a year ago

Screenshot

Attachments


a year ago

Are you sure that it's working for you? As per namecheap documentation:

Redirecting with a secure connection (HTTPS) is only possible to a different destination domain (e.g. http://www.domain.tld to https://www.anotherdomain.tld)

Unless you have the Namecheap SSL plugin on cPanel?


caseyocampo
HOBBYOP

a year ago

I didn’t have to use the cPanel. There’s a section in the dashboard that has an option to set a redirect. I’ve added a screenshot in the thread.


a year ago

Yea I saw, though from what I know there is no world where that should work

but I guess if it works for you then alls well that ends well


peter-peter254
HOBBY

a year ago

Just an extra comment here for anyone looking on a resource on how to add a custom domain. (On a hobby plan).

https://youtu.be/pkXHu7lFQMU?si=hb8k1gjRLrtqSwBA


caseyocampo
HOBBYOP

a year ago

It’s the only thing I have set up that would add this behavior. If there’s anything I missed, I will update this thread!


a year ago

Alright awesome, glad it worked out then


Status changed to Solved brody about 1 year ago


a year ago

!s


caseyocampo
HOBBYOP

a year ago

My friend, it indeed did not work out LOL I tested visiting my site on a friends device and got nothing. After signing up for the Hobby Plan I was able to add another domain for my “www” and all is good now.


a year ago

Oh perfect, thanks for the update


Status changed to Open dev about 1 year ago


Status changed to Solved dev about 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...