检查停放域名的有效方法?
我正在编写一个脚本来检查给定的域是否已停放。 到目前为止,我有这个解决方案:
- 在网址末尾添加几个字符。
- 如果 url 重定向到另一个页面并且
- 返回 302 http 状态代码,则为停放域名。
- 返回除 302 之外的其他域名,则为普通域名。
- 但一些正常的域名也会返回 302。
因此非常感谢任何建议。
I am writing a script that checks if given domain is parked or not. so far, I have this solution:
- add couple of characters at the end of the url.
- if url redirects to another page and
- returns 302 http status code then it is parked domain.
- returns other than 302 then it is normal domain.
- but some normal domains also return 302.
so any suggestions are greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事情没那么简单。 302 响应仅意味着内容暂时位于不同位置。 这可能发生在正常的网站上,但并不总是发生在停放的网站上。
我在一家拥有超过 20,000 个托管域名的 ISP 工作,我们没有在其中任何一个域名上使用 302。
我认为你不会找到 100% 的解决方案。 即使您检查了页面上是否有“购买此域名”和“此域名可能出售”等短语,您也无法确定。
It's not as simple as that. A 302 response just means content is temporarily at a different location. This can happen on a normal website and it doesn't always happen on a parked site.
I worked at an ISP with over 20,000 parked domains and we didn't use 302's on any of them.
I don't think you'll find a 100% solution for this. Even if you checked the page for phrases such as "Buy This Domain" and "This Domain May Be For Sale" you won't know for sure.