Method to detect a parked page?

后端 未结 4 1027
傲寒
傲寒 2020-12-28 20:57

Anyone know of a way to programatically detect a parked web page? That is, those pages that you accidentally type in (or intentionally sometimes) and they are hosted by a d

4条回答
  •  星月不相逢
    2020-12-28 20:59

    Here is a test that I think may catch a decent number of them. It takes advantage of the fact you don't actually want to have real web sites up for your parked domains. It looks for the wildcarding of both subdomain and path. Lets say we have this URL in our system

    http://www.example.com/method-to-detect-parked.

    First I would check the actual URL and hash it or grab a copy for comparison.

    My second check would be to

    http://random.example.com/random

    If it matches the original link or even succeeds, you have a pretty good indicator that the page is parked. If it fails I might check both the subdomain and path individually. If the page randomly changes some elements, you may want to choose a few items to compare. For example make a list of links included in the page and compare those or maybe the title tag.

提交回复
热议问题