Block another domain in nginx

I run my website on ghost
Someone else connect their domain to my server, and i want to stop it. Because of security and SEO reasons.

I tried using nginx to nlock connections that aren’t addressed to my domain, but i can’t find the right config (there are many) and what to put in it.

Can you help me pls? What i should do?

If the other domain is scraping your content, send the domain a takedown order, and do the same with Google and Hosting Ukraine LLC etc.

However, it looks like you’re using the same ISP, so I’d reach out to them as it may be a server misconfiguration issue. Your site currently has an internal error, and the other timed-out.

You may also try blocking IPs related to the ISP, but in your case both websites share the same IP, so this won’t work. Consider getting a virtual server with its own unique IP address.

location / {

Alternatively, block the address(es) using your firewall.