【问题标题】:Google isn't indexing all the Pages in my SiteGoogle 未将我网站中的所有页面编入索引
【发布时间】:2015-10-01 02:04:21
【问题描述】:
在我的website 中,我使用 jquery 动态更改 div 的主要内容(我的主要内容),这样当有人按下链接时页面不会重新加载,而是将内容添加到 div。
Google 在我的网站中搜索链接,只找到#smth,它没有索引页面。我应该怎么做才能让 Google 索引我的其他页面?
有什么想法吗?
【问题讨论】:
标签:
indexing
search-engine
【解决方案1】:
您可以使用 Sitemaps 协议将 sitemap.xml 文件添加到您网站的根目录(或 robots.txt 中指定的其他位置)。 Sitemaps 协议允许您通知搜索引擎有关网站上可供抓取的 URL (wiki)。
一个示例站点地图(来自上面引用的wiki)如下所示:
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>http://example.com/</loc>
<lastmod>2006-11-18</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
</urlset>
搜索引擎的爬虫将访问您的 sitemap.xml 并索引指定的位置。
【解决方案2】:
我发现答案是添加!在您的哈希 url 前面并配置服务器以将页面快照发送给谷歌更多信息here