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

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

问题描述

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



我的第一意见是让他们在他们的HTML中发表特殊评论我的程序可以刮。例如:

 <! -  @webcode:1234  - > 

这种方法的一个可能的问题是理论上有人可以将它添加到他们页面上的评论或一些其他添加内容的方式。虽然我不确定我有没有这样做,但我不知道。



我的另一个想法是,因为我打算提供一个JavaScript小部件,

 < script type =text / javascriptsrc =http://yoursite.com/widget/widget/A4923D2342JF>< / script> 

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

解决方案

以下是Google用于域验证




  • 创建CNAME或TXT记录在
    域的DNS设置中。这些方法
    需要在域名托管商的
    网站上访问您的域的
    的DNS设置。您可以选择
    (CNAME或TXT记录)的哪种方法取决于
    您的Google Apps
    控制面板中提供了哪些方法。目前,我们正在推出TXT记录方法,但
    仍然会要求许多客户创建一个
    的CNAME记录。


  • 将HTML文件上传到您的域的
    Web服务器这种方法需要为
    能够将文件上传到您的域名
    网络服务器。如果您的
    无法访问您域中的
    DNS设置,请尝试执行此操作。

  • b $ b此方法仅适用于
    的某些客户(这是我们推出的另一种新的
    方法)。它
    需要访问您的域的Web
    服务器,但不能上传到它。试试
    这样做,如果你有写访问权限
    到服务器上的文件,但不能
    上传新文件。




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


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.

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.

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?

解决方案

Here are the options that Google uses for Domain verification:

  • 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.

  • 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 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天全站免登陆