谷歌站点地图协议 - 如何在 ASP.NET 4 中为谷歌创建站点地图
嗨,我亲爱的领主们:
我有一个如下所示的页面:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MySiteNav.aspx.cs" Inherits="Amlak.MySiteNav" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>My Site Nav</title>
<link href="Styles/MySiteNav.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>
My Web Site Navigation
</h3>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1">
</asp:TreeView>
</div>
</form>
</body>
</html>
问:
1-引入google作为我的网站导航网站地图就够了吗?
我应该在此页面或其他页面添加一些内容吗?
2-google SiteMap 的常规协议是什么?
我用谷歌搜索了这个协议!但我似乎这个协议已从谷歌帮助中删除!其他资源太旧了!
谢谢你的帮助
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有关 Google 接受的 Sitemap 协议的信息可以从以下页面找到:
他们还详细介绍了如何创建站点地图。
请注意,这与 MS 为 ASP.NET Sitemap 格式选择的格式不同,但您很可能能够使用一些 XSLT 生成另一种格式 - 例如,搜索引擎 Sitemap 并不真正关心站点结构,因为它不构建导航功能,它只关心页面本身。
编辑以回复评论:
创建站点地图后,您需要将其告知搜索引擎。您可以通过多种方式执行此操作,首先从我的第二个链接 "提交站点地图"。
许多网站引擎还支持
Robots.txt
文件的“站点地图”扩展:另一种选择是将其添加到一个或多个页面的元数据中:
或者,如果目前没有很好地抓取您的内容,您也可以使用搜索引擎的网站管理员区域将其直接提交给搜索引擎,其中您可以登录,一旦您证明了该网站的所有权(通常通过将“已知”文件上传到根目录,或使用已知字符串修改主页的元数据),您就可以直接上传站点地图,管理网址并获取效果报告:
Information about Google's accepted Sitemap protocol can be found from the following page:
They also provide details on How to create a Sitemap.
Note that this is a different format to that chosen by MS for the ASP.NET Sitemap format, but you might well be able to produce one from the other with some XSLT - for example, the search engine Sitemap doesn't really care about site structure because it's not building navigational features, it only cares about the pages themselves.
Edit to respond to comment:
Once you've created your sitemap you need to tell the search engines about it. There are a number of ways you can do this, starting with the page linked to from my second link called "Submitting Sitemaps".
Many site engines also support the "Sitemap" extension to the
Robots.txt
file:Another option is to add it to the metadata of one or more of your pages:
Alternatively, if you're not being crawled well at the moment, you can also submitting it directly to the search engines using their Webmasters areas, where you can log in, and once you've proved ownership of the site (usually by uploading a "known" file to the root, or modifying the metadata of the homepage with a known string), you are able to upload sitemaps directly, manage URLs, and get reports on performance:
以下是有关站点地图所需格式的一些信息:http://www.sitemaps。 org/protocol.php
here is some information on what format you'd need to have for your sitemap: http://www.sitemaps.org/protocol.php
检查 http://www.vinull。 com/Post/2006/12/03/aspnet-supporting-the-sitemap-protocol.aspx 用于将 asp.net
SiteMapProviders
与站点地图协议集成。Check http://www.vinull.com/Post/2006/12/03/aspnet-supporting-the-sitemap-protocol.aspx for integrating asp.net
SiteMapProviders
with the sitemaps protocol.