Jump to content

Redirect sub-domain to a fixed IP?


Jeremy Harris

Recommended Posts

A question for the web masters here.................

 

I've set up a secure Nextcloud service running on a RPi3, which seems to works OK on my fixed IP.  Because I also have a registered domain, I'd like to set up an easier to remember sub-domain (already done via the hosting company control panel) and redirect that to my fixed IP.  I think that what I need to do is set up a new CNAME record to redirect the sub-domain to the IP, but I'm not at all sure, and I don't want to screw up anything.

 

Looking at the control panel it seems pretty easy to just set up a new CNAME record, but before I do anything I'd welcome any advice, please.

 

As an aside, Nextcloud runs OK on a RPi3, with a 1Tb HDD, in fact it's surprisingly good.  The even better thing is that the whole set up is averaging just over 2W, which seems pretty good for a fairly capable locally hosted cloud.  Being locally hosted means I can back it up easily over the LAN every night, too.

Link to comment
Share on other sites

Yes a cname should do the trick assuming you are appending different services on different points to the same fixed up address. For example web services at www.mydomain.com and ftp.mydomain.com these would be your cnames that would point at the mydomain.com A record.

 

Hopefully that's clear enough.

  • Like 1
Link to comment
Share on other sites

Brilliant, thanks very much indeed.  I have the 1Tb Raspberry Pi 3 Nextcloud server up and running, with everything ready for a secure and easy to access HTTPS connection to the outside world, I just need to setup up the redirect from a set up sub domain to the fixed IP.  It'll have to wait till after the weekend now, as the fixed FTTC IP is at the new house.

Link to comment
Share on other sites

The wrinkle about CNAME that can catch people out is that you can't use them for mail servers. In other words, if you're running an SMTP mail server on the Pi, its MX record can't point to a CNAME.

Link to comment
Share on other sites

Thanks @richi, I've no plans to run a mailserver (yet!), I'm just trying to set up secure, private and encrypted file sharing, so that I can access files via the web that are hosted on a pretty secure home server. 

 

So far I seem to have most things working, thanks to some useful open source stuff, like Let's Encrypt, and Nextcloud.  Bit of a steep learning curve for me, as I'm far more comfortable with hardware and machine code...............

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...