谷歌站点地图协议 - 如何在 ASP.NET 4 中为谷歌创建站点地图

发布于 2024-11-09 08:17:47 字数 1075 浏览 0 评论 0 原文

嗨,我亲爱的领主们:
我有一个如下所示的页面:

<%@ 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 的常规协议是什么?
我用谷歌搜索了这个协议!但我似乎这个协议已从谷歌帮助中删除!其他资源太旧了!

谢谢你的帮助

hi my dear lords :
i have a page like below :

<%@ 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>

Q's :
1-is it enough for introduce to google as my web site navigation site map?
should i add something in this page or other pages?

2-what is the regular protocol for google SiteMap ?
i googled it for this protocol ! but i seems this protocol has been deleted from google help! the other resources are too old!

thanks for halp

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

阿楠 2024-11-16 08:17:47

有关 Google 接受的 Sitemap 协议的信息可以从以下页面找到:

关于站点地图网站站长工具帮助网站。

他们还详细介绍了如何创建站点地图

请注意,这与 MS 为 ASP.NET Sitemap 格式选择的格式不同,但您很可能能够使用一些 XSLT 生成另一种格式 - 例如,搜索引擎 Sitemap 并不真正关心站点结构,因为它不构建导航功能,它只关心页面本身。


编辑以回复评论

创建站点地图后,您需要将其告知搜索引擎。您可以通过多种方式执行此操作,首先从我的第二个链接 "提交站点地图"

许多网站引擎还支持 Robots.txt 文件的“站点地图”扩展

Sitemap: http://example.com/sitemap_location.xml

另一种选择是将其添加到一个或多个页面的元数据中:

<link rel="sitemap" href="sitemap.xml" type="application/xml" />

或者,如果目前没有很好地抓取您的内容,您也可以使用搜索引擎的网站管理员区域将其直接提交给搜索引擎,其中您可以登录,一旦您证明了该网站的所有权(通常通过将“已知”文件上传到根目录,或使用已知字符串修改主页的元数据),您就可以直接上传站点地图,管理网址并获取效果报告:

Information about Google's accepted Sitemap protocol can be found from the following page:

About Sitemaps on the Webmaster Tools Help site.

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:

Sitemap: http://example.com/sitemap_location.xml

Another option is to add it to the metadata of one or more of your pages:

<link rel="sitemap" href="sitemap.xml" type="application/xml" />

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:

半﹌身腐败 2024-11-16 08:17:47

以下是有关站点地图所需格式的一些信息: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

羁〃客ぐ 2024-11-16 08:17:47

检查 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.

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