以编程方式确定某人是否拥有网站? [英] programmatically determining if someone owns a website?

查看:30
本文介绍了以编程方式确定某人是否拥有网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找出确定某人是否是网站实际所有者的最佳方法.我指的不仅仅是域名,尽管在很多情况下可能是这样.

I need to figure out the best way to determine if someone is the actual owner of a website. I don't just mean the domain although in a lot of cases that might be the case.

我的第一个倾向是让他们在他们的 HTML 中添加一个我的程序可以抓取的特殊注释.例如:

My first inclination was to have them put a special comment in their HTML that my program can scrape. e.g.:

<!-- @webcode:1234 -->

这种方法的一个可能问题是理论上有人可以将其添加到其页面的评论中或以其他方式添加内容.虽然我不确定我让他们做的任何事情都不能那样做.

One possible problem with that approach is someone in theory could add it in the comments on their page or some other way to add content. Although I'm not sure anything I have them do couldn't be gotten that way.

我的另一个想法是,因为我还计划提供一个 JavaScript 小部件,所以只是抓取它,尽管我不想强制他们添加小部件.

My other idea was since I was planning on also offering a JavaScript widget was to just scrape that although I didn't want to necessarily force them to add the widget.

<script type="text/javascript" src="http://yoursite.com/widget/widget/A4923D2342JF"></script>

还可以采用哪些其他机制来确定网站的所有权/控制权?

What other mechanisms could be employed to determine ownership/control of a website?

推荐答案

以下是 Google 用于 域验证:

Here are the options that Google uses for Domain verification:

  • 在您的文件中创建 CNAME 或 TXT 记录域的 DNS 设置.这些方法需要访问 DNS 设置您的域名在您的域名托管服务商处网站.您可以选择哪种方法(CNAME 或 TXT 记录)取决于您的 Google Apps 中提供的内容控制面板.我们目前在推出 TXT 记录方法,但仍然要求许多客户创建一个取而代之的是 CNAME 记录.

  • Create a CNAME or TXT record in your domain's DNS settings. These methods require accessing DNS settings for your domain at your domain host's website. Which method you can choose (CNAME or TXT record) depends on what's offered in your Google Apps control panel. We're currently rolling out the TXT record method but still ask many customers to create a CNAME record, instead.

将 HTML 文件上传到您的域的网络服务器 这种方法需要被能够将文件上传到您的域的网络服务器.尝试这样做,如果你无权访问您的域DNS 设置.

Upload an HTML file to your domain's web server This method requires being able to upload files to your domain's web server. Try doing this if you don't have access to your domain's DNS settings.

在主页上添加标签此方法仅适用于一些客户(这是另一个新客户我们正在推出的方法).它需要访问您域的网络服务器,但不上传到它.尝试如果您有写权限,请执行此操作到服务器上的文件,但不能上传新文件.

Add a tag to your home page This method is available only for some customers (it's another new method we're rolling out). It requires accessing your domain's web server but not uploading to it. Try doing this if you have write access to files on the server but can't upload new files.

CNAME/TXT 或将 HTML 文件上传到域的根目录是最安全的,因为它需要对域进行完全控制.如果您想要更宽松一些,您可以在头节点中使用 Meta 标签,这将阻止某人向页面添加评论.一切都取决于您想要的安全程度.

CNAME/TXT or uploading an HTML file to the root of the domain is the most secure, since it requires full control of the domain. If you want to be a bit more lax you could use a Meta tag in the head node, which would prevent someone from adding a comment to a page. All depends on how secure you want to be.

这篇关于以编程方式确定某人是否拥有网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆