
seo 优化
seo 优化是未来更好的给爬虫收入,以便提高排名和权重。除了加
<meta name="Keywords" content="**,**,********">
<meta name="Description" content="**,**,********">
还可以加上结构化数据。一段代码javascript 代码。
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "SaleEvent",
"header":"Message Here!",
"name": "page Name Millions",
"description": "page description",
"image": "https://img/lotto/lg/mega-millions.png",
"startDate": "2018-01-13T02:00:00+00:00",
"endDate": "2018-01-13T02:15:00+00:00",
"url": "https://www.****.uk/en/lotto-results/mega-millions/2018-01-13",
"location": {
"@type": "Place",
"address": "co.uk",
"name": "co.uk"
},
"offers": {
"@type": "Offer",
"price": "2.50",
"priceCurrency": "EUR",
"url": "https://www.******.co.uk/en/mega-millions"
},
"performer": {
"@type": "Organization",
"image": "https://img/lotto/lg/mega-millions.png",
"name": "Mega Millions",
"url": "http://www.**.com/"
}
}
</script>
下列是google 官方的例子,更详细的可翻墙查看。


还有一种就是站点加sitemap.xml。
<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.katoto.com/</loc>
<priority>1.0</priority>
<lastmod>2019-03-22T04:20:32+08:00</lastmod>
<changefreq>always</changefreq>
</url>
<url>
<loc>https://www.katoto.com/eduIndex/Class1</loc>
<priority>1</priority>
<lastmod>2019-03-22T08:00:00+08:00</lastmod>
<changefreq>always</changefreq>
</url>
// .... 按照页面添加
</urlset>
附加:
关于结构化数据的描述
网站的SEO以及它和站长工具的之间秘密
SEO:让搜索引擎对你的网站更有亲和力(译)
站点信息
humans
谷歌统计
注意自己去analytics.google.com 上申请账号。
- 不带ga.js
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118873303-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-118873303-1');
</script>
- 带ga.js
<script type="text/javascript">
<!-- Google Analytics -->
var _gaq = _gaq || [];
// ua 是一个账号、id
_gaq.push(['_setAccount', 'UA-36810333-1']);
_gaq.push(['_setDomainName', 'sheetjs.com']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
// 判断当前页面的协议,如果是https
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>