This is no rocket science but while I was writing the blog post on “Remove a page or site from Google” it came to me that setting IP-restriction on a per file basis in IIS is not that straightforward and I thought I would do short post on how it’s done more in detail.
OK so here we go with the really basic stuff. First of all, open the IIS Manager and click the site where you want to set the restriction. Next click Content View in the bottom of the Features View.
With the file selected, right-click and pick Switch to Features View. It’s really important that you do this. Note that clicking on the Features View tab will only bring you back to the features of the entire site.
This will take you back to the Features View of the file you clicked in the Content View.
Now you can double-click the “IP Address and Domain Restrictions” icon in the IIS section to set restrictions on a specific file whether you wanna deny or allow access.
Of course this is not limited to the IP-restriction feature only but you can set any feature for that highlighted file.