Is it normal website can be accessed via IP and Domain

Viewed 24

I want to explain first.

I have a domain and I connected it to Cloudflare so I can get free SSL. Then I created a Linux (Debian 11) vm server on Google Cloud.

I've added A and CNAME records on my Cloudflare and I can access my site with my domain.

The problem is, I also can access my site using a static External IP from Google Cloud. Is this normal?

My site is tempvalidasi1.site

3 Answers

If you want separate domain access in server you need use server-side tools like nginx. When you use nginx you can assign port, root directory and specific domain path in config which that calculate by user request.When users will access only to domain in this case users can see your site content, otherwise it is will not possible.

Yes you can also access using IP and domain name actually domain in masking IP address.
if you do need to access the website using an IP address is also possible.

Related