检查停放域名的有效方法?

发布于 2024-07-26 09:31:40 字数 282 浏览 2 评论 0原文

我正在编写一个脚本来检查给定的域是否已停放。 到目前为止,我有这个解决方案:

  • 在网址末尾添加几个字符。
  • 如果 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初吻给了烟 2024-08-02 09:31:40

事情没那么简单。 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文