Mobile app version of vmapp.org
Login or Join
Eichhorn148

: Why Is Another Domain Resolving To My IP Address? I'm not really sure if this is something that I should worry about... I'm currently renting a dedicated server which is hosting a website

@Eichhorn148

Posted in: #Domains #IpAddress #MultipleDomains

I'm not really sure if this is something that I should worry about... I'm currently renting a dedicated server which is hosting a website I've created. The domain of the website was registered with GoDaddy. After submitting a sitemap to Google several months ago, I've noticed that another domain name is resolving to my IP address. This means that every page on my website is actually accessible from another domain. As far as I can tell, the other domain name is meaningless to me, so I'm not sure if this is something I should worry about or not. Is this a residual DNS record from another site that is probably no longer in use? Is it important from the standpoint of either security or SEO? My website is a .com which will later serve e-commerce purposes. The other domain has a top-level domain of st. It's the first one of those that I've encountered.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Eichhorn148

2 Comments

Sorted by latest first Latest Oldest Best

 

@Phylliss660

If they're really pointing their DNS records to your IP address (and your webserver is configured so that this actually shows your site's content on their domain; see Lazy Badger's answer), then you can stop this sort of "DNS hotlinking" with a simple mod_rewrite rule:

RewriteCond %{HTTP_HOST} otherdomain.st$ [NC]
RewriteRule ^ - [F]


This will return a 403 Forbidden response to any HTTP requests coming in through otherdomain.st or any subdomains of it.
If you use this in an .htaccess file, remember to prepend the standard magic invocation:

RewriteEngine On
RewriteBase /


Of course, there are literally infinitely many ways to customize this; for example, you could use [G] instead of [F] to return a 410 Gone response instead, which should cause search engines to quickly delist all the pages on that domain, or you could even just redirect the URLs to your own domain:

RewriteCond %{HTTP_HOST} otherdomain.st$ [NC]
RewriteRule ^(.*)$ yourdomain.com/ [L,R=301]


Tempting as it might be, replacing the target URL in the rule above with a link to your favorite shock site is probably not advisable.

10% popularity Vote Up Vote Down


 

@Goswami781

This means that every page on my website is actually accessible from another domain.


Any owner of domain can add in managed domain IN A|IN CNAME record, which will point to any IP in the Net, but if you're using name-based virtual hosts, then your site will likely¹ only be accessible via the hostname specified in the ServerName and ServerAlias directives.

However, if you're using IP-based virtual hosts (or no virtual hosts and the "main server" is simply bound to the IP), then any request to that IP will reach your site, regardless of the hostname.

¹ - One caveat to the case with name-based vhosts is that, the first vhost bound to that IP/port is treated as its default vhost. So even using name-based vhosts, a request to an unknown hostname can still be routed to your site if your it's the first vhost in your configs.

You can potentially avoid this by binding the VirtualHost directive to a particular hostname/domain, but this could present problems of its own if domain isn't owned by you.

The other way to prevent this would be to simply set the first name-based vhost aside as the default vhost and render an error message to the client.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme