Domains that redirect to an IP address?


#1

Hi,

I was wondering if Let’sEncrypt will work for the following use case:

I have a Raspberry Pi at home which I am using as an Apache server. This server works and can be accessed publicly through one static IP address. I have bought a domain name and would like this domain name to forward to my home server such that the address remains as http://www.mydomainname.com but the content comes from my server. Would Let’s Encrypt work on this domain name such that it becomes https://www.mydomainname.com? I imagine it should since it’s pretty much how websites work anyway but I’m not sure and would like to verify before I invest more time.

Thanks,
Matthew


#2

As an update I got this to work on my Raspberry Pi server with a domain name which I purchased, that I was redirecting to my IP address. I would still like to hear any thoughts on this from someone more experienced than I.


#3

This phrase could have quite a few different meanings. Most likely if you’re able to be more precise we can say a lot more.

For example, if you mean here that you configured the name you purchased with a DNS ‘A’ (or ‘AAAA’ for IPv6) record and specified the static IP address in that record, then yes, Let’s Encrypt can most certainly work for this scenario, it’s exactly how the majority of web servers in the world are used.

On the other hand if you meant that you have a hosting service somewhere, which emits an HTTP 301 redirect response for this purchased name to a URL prefix with an IP address in the actual URL, such as http://172.17.18.19/ then Let’s Encrypt can’t really help there because Let’s Encrypt only issues certificates with names in, not addresses, and this type of address doesn’t have a name to match against the certificate.


#4

That’s correct. The purpose of DNS (and thus your bought domain name) is the process of linking such (bought) domain name to an IP address, such as the address of your RPi.


#5

Thanks! As a follow up question, if I’ve bought a domain name and have my own server with a unique IP address I don’t need to buy a dedicated IP from my domain registrar correct?


#6

I’m not even sure what the use could be of (just) a dedicated IP from your domain registar.


#7

I meant to say hosting service: I was using BlueHost as a hosting service with a dedicated IP before I decided to switch to the Raspberry Pi by redirecting domain requests to my Raspberry Pi’s IP address. I just wanted to make sure I could get rid of the dedicated IP provided by the old hosting service without any issues. It was a stupid question but for anyone else who sees this: so long as your server is on a unique IP and you redirect domain requests to that IP you do not need a dedicated IP from a hosting service. Thanks again Osiris.


#8

Do you, as @tialaramex already pointed out, really mean “redirect”? I recommend you to use the right terms, because this is prone to error: do you just mean you’ve configured your domain such as it contains the value of your RPi’s IP address in it’s A or AAAA records? Or do you have some kind of “redirect service” from your hosting provider? Because this is a big difference…


#9

Sorry I’ve been learning all of this over the past couple of days. I meant to say I was specifying the Raspberry Pi’s IP address in the domain’s DNS A record.


#10

It’s a strange question. That’s basically how every website on the planet works.


#11

Then it will work like any other server. Letsencrypt resolves the A-Record and sends a request to the IP, verifying the ownership.

Having a raspberry pi or a server in a data center is no difference there. And it will even work without static ip, as long as your A-Record points to your current ip.


#12

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.