Solve the problem of resolving other people's domain names to our server IP address

888u

Last update at :2024-06-19,Edit by888u

Snail has a Baidu cloud server that was opened during Double Eleven last year, and it has been left unused since it built an LNMP one-click WEB website environment. However, in the past few days, I have received continuous text messages from Baidu Cloud, mentioning whether the domain name of case B has been resolved to this server, which requires my attention. In fact, after I checked, it was confirmed that this domain name is resolved in this server IP, and it is a newly registered domain name. I don’t know what the intention was, whether I forgot it, or this domain name was originally resolved here, and this server turned out to be him. The subscription has expired but has not been renewed?

Let’s analyze it theoretically. We can’t stop others. And it has no impact on the server. After all, we have not accessed or bound this domain name, and it has no impact on our existing servers or sites.

I believe many of us also have this problem. Generally, after the server is configured with a WEB environment, some people make websites in the root directory, and some people leave the default page there. If someone resolves to the server IP, they can open it and see the contents of the root directory. So how to deal with it?

First, don’t build a website in the root directory

We should not put website page content in the root directory, so even if it is parsed, it will still be blank content. There will be no problem, even if it is pointed intentionally, there is no harm if there is no content pointed to it. Including when building a website on our virtual host, Snail recommends not building a website in the root directory.

Second, jump directly to others

We can set up a jump in the root directory, using .htaccess or direct meta jump.

A – .htaccess jump

This htaccess file can only be used in the apache environment.

RewriteEngine OnRewriteBase /RewriteCond %{HTTP_HOST} !^www.laobuluo.com$ [NC]RewriteRule ^(.*)$ http://Domain name to jump to/$1 [L,R=301]

Enter a domain name that is not ours here to jump to any other website.

B – direct meta jump

We can choose one of them to jump.

Recommended site search: free ip proxy server, free server for registered domain names for permanent use, Guangzhou server hosting, domain name registration query cn domain name personal registration vps virtual host, US domain name registration, multi-ip station group server, how to query domain name registration number ,

Solve the problem of resolving other people's domain names to our server IP address

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码