Recently when I search my website on google, I find that another domain's description is identical to my domain. I'm terrified and try to understand the security breaches of my website as much as possible. I clicked on the link of this fake website and it turned out to be 'Your connection is not private'. When I search this fake website's domain through whois, it shows another company's info.

My website is built with react, hosted on a VM with docker and nginx.

I found this fake website today, just after I tried implementing google analytics and google tag manager on my website yesterday.

Can you tell me what's going on now please? And how I can prevent any security issues?

My nginx config in default.conf file

```
server {
    listen 80;

    server_name www.mywebsite.com; 
    rewrite ^(.*)$ https://$host$1; 

    location / { 
        root   /usr/share/nginx/html;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    } 
    error_page 404 /index.html;
    location = / {
        root /usr/share/nginx/html;
        internal;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

# nginx docker container, ssl config
server {
    listen 443 ssl;

    server_name www.mywebsite.com;
    root html;
    index index.html index.htm;
    ssl_certificate /path/to/ssl.pem; 
    ssl_certificate_key /path/to/ssl.key;   
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
        try_files $uri $uri/ /index.html;
    } 
}

```

---

Now I know I need to setup the default server
---------------------------------------------

##### 80 default server works fine

I'm not going to list it 80 default server here, more see accepted answer.

##### 443 ssl default server, which doesn't work for me :(

```
server {
    listen 443 ssl default_server;
    ssl_certificate path-to-pem;
    ssl_certificate_key path-to-key;
    server_name _;

    # Everything is a 404 Not found
    location / {
        return 404;
    }
}

```

---

I still don't know how to setup the 443 ssl default server block for nginx, please let me know if you have any idea.
--------------------------------------------------------------------------------------------------------------------