Connection to the IP address is not secure (like there is no cert) even though I have a cert for the fqdn

So here is my domain name: https://creoticket.computeronsite.net/

the cert is working great but when I connect to the IPv4 address which is https://23.29.129.71 it is giving me that it is not a secure connection.

I'm using ubuntu server and the web server is apache

Hello @mahmoudelfawair, welcome to the Let's Encrypt community. :slightly_smiling_face:

[quote="mahmoudelfawair, post:1, topic:217408"]7
https://23.29.129.71 it is giving me that it is not a secure connection.
[/quote]

And that is correct.
Let’s Encrypt offers Domain Validation (DV) certificates.
And not IP Address certificates.

4 Likes

Hey Bruce is there a way that I can stop access to the server from the IP or redirect any connection that comes from there to the domain name?

Usually nothing and nobody connects to the IP address without using a hostname. Why is this an issue for you specifically? :slight_smile:

5 Likes

Hey, my boss is bugging me about it so I need to find a solution <3

You can redirect from the IP address on HTTP to the hostname on HTTP(S), but if someone enters the IP address manually with https:// (or HTTPS is used by default such as Chrome nowadays does), you really need to have a certificate for an IP address.

As Bruce already mentioned, Let's Encrypt does not offer certificates for IP addresses. Currently, I know of only one free CA that offers certs with IP addresses and that's ZeroSSL. Unfortunately, their ACME server (currently) does not offer those IP address certificates: only using their web interface. And their web interface is limited to just 3 certificates per account...

Alternatively you could buy a certificate somewhere.

4 Likes

This is expected.
Do you really need to connect to that system securely via its' IP address?

4 Likes

I can't imagine why.. really. That is why DNS was invented to begin with.
IP = Domain.name

1 Like
# REDIRECT TRAFFIC FROM IP TO DOMAIN
	RewriteCond %{HTTP_HOST} ^123\.456\.789\.000$
	RewriteRule ^(.*)$ https://your.domain.com/$1 [L,R=301]

Might help
.htaccess file.
Of course you can do it in the vhost config . .htaccess works for me.
RIP

2 Likes

@mahmoudelfawair Your boss might not realize that accessing a site via HTTPS to its IP address actually doesn't work for the vast majority of web sites in the world.

I just looked up IP addresses for

  • Microsoft
  • Apple
  • kernel.org (Linux kernel development coordination)
  • GitHub
  • Amazon
  • A couple of U.S. government agencies
  • Let's Encrypt itself
  • The New York Times
  • Le Monde
  • Comcast (largest U.S. residential Internet service provider)
  • the German parliament

and tried to access all of them (with HTTPS) directly by IP address.

None of them worked!

As other people have said in this thread, there is such a thing as a publicly-trusted certificate for an IP address, but most certificate authorities don't issue them, and most web sites don't possess them. They are really quite rare and are most known for the (very few) web sites where the IP address is part of the public branding, such as https://1.1.1.1/ and https://8.8.8.8/.

8 Likes

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