Well, this is not directly related to Lucee, but I’m sure it is a rather
common issue and someone might help to clarify it:
In IIS logs I can see a lot of hits to domains which don’t exist on my
server. They fall into 2 main categories:
A) domains which are no longer hosted on the server ( some clients scrapped
the sites and did not update their DNS records anyhow )
B) funny requests for subdomains which were never hosted on the server -
for example www.somedomain.com is hosted but some bots (usually Baidu
Spider) are trying to request webmail.somedomain.com,
site.somedomain.com, 2www.somedomain.com etc.
As there are no IIS bindings for these domains, these requests would hit
the Default Site and expose Lucee start page - not good.
So far, I have simply gone to Default Site / IPv4 and Domain Restrictions
/ Edit Feature Settings and set Access for unspecified clients = Deny.
This works, but returns standard IIS 403 - Access Denied page which is
rather ugly. Supposedly this can be configured in IIS 8 to return 404, but
I have IIS 7.5 at this moment. So I guess I will have to live with that.
Sure, I would rather return 410 - Gone status for all domains in the A)
category.
The only idea I could come up with, is to create a new IIS site, add all
the non-existent domains from the A) category as bindings there and then
configure URL Rewrite to return the 410 status for them.
Is this the right way to deal with this, or are there some better options ?
Regards
Ivan