seo

如何为 Drupal 添加简单的 SEO META 标签(title keywords des...

二次信任 提交于 2019-12-10 08:52:00
Drupal 做为优秀的世界级开源 CMS 建站系统,自然有很多开发者贡献与 SEO 相关的模块插件扩展例如:用来批量自定义 URL 的 PathAuto 模块和制作 SiteMap 站点地图的 xmlSiteMap 模块当然还有就是用于 keywords description 等等位于页面 HEAD 标签内一些 META 标记的 NodeWords 模块等等,但我个人通常对于 20 行以下代码能够实现的功能不大愿意使用第三方模块,所以这里提供一些 Drupal 原生代码以实现在网页的 HEAD 标签内添加一些对 SEO 有利的 META 标签甚至 TITLE 标签等等…… 示例将仅仅针对 NODE 文章节点页面做 SEO 优化演示,其他页面大家可以以此类推,具体需要将以下代码放置于当前使用主题模板的(node.tpl.php)文件中: if ( $ page ! = 0 ){ //首先判断是否为节点单页而非文章列表页; $ keys = $ info = NULL ; $ info = substr ( filter_xss ( $ node - > content[ 'body' ][ '#value' ], array ()), 0 , 240 ); //过滤节点内容部分的特殊字符并截取前 240 个字符做为摘要部分; foreach ( $ node - >

SEO术语解析

自作多情 提交于 2019-12-10 08:39:31
做搜索引擎周边工作的朋友们经常会提到PV、UV、UIP、VV,做Google Adsense/Adwords、百度竞价排名、阿里巴巴P4P(外贸直通车)的朋友们都会提到CPC、CPM、RPM、CTR,对于大部分非相关人员来说往往听得一头雾水,那么到底什么是PV、UV、UIP、VV、CPC、CPM、RPM、CTR? PV:Page View,页面访问量,也就是曝光量。 UV: UniqueVisitor,独立访客数,同一个访问多此访问也只算1个访客。通常情况下是依靠浏览器的cookies来确定访客是否是独立访客(之前是否访问过该页面),在同一台电脑上使用不同的浏览器访问或清除浏览器缓存后重新访问相同的页面,也相当于不同的访客在访问,会导致UV量增加。 UIP: Unique IP,独立IP,和UV类似,正常情况下,同一个IP可能会有很多个UV,同一个UV只能有一个IP。 VV:Visit View,访问次数,是指统计时段内所有访客的PV总和。 CPC: Cost Per Click, 每次点击费用,即点击单价。 CPM:Cost Per Mile,千次展示费用,即广告展示1000次需要支付的费用。 RPM:Revenue PerMille, 千次展示收入,和CPM类似,RPM是针对广告展示商(比如Adsense商户)而言的。 CTR: Click-throughRate, 点击率

使用Nginx的压缩功能提升蝉知建站系统的访问速度

被刻印的时光 ゝ 提交于 2019-12-10 06:55:19
众所周知,一个网站的加载速度越快,效果越好。提升网站的加载速度可以从很多方面来入手,比如提高服务器的配置,增大带宽等等。这 其中比较常用的一个手段就是对HTML,CSS和JS等文本性内容进行压缩,以减少和用户浏览器之间数据传输的大小。常见的Apache和Nginx都提 供了压缩模块来实现该功能。本篇文章以Nginx为例来讲解如何压缩蝉知企业建站系统的输出。 Nginx的配置: 打开Nginx的主配置文件,一般默认的配置文件中都已经有gzip功能的配置,配置代码如下: gzip on; gzip_disable "msie6"; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_buffers 16 8k; gzip_http_version 1.1; gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss 如何确认压缩生效 第一种方法:使用火狐或者chrome的开发者工具 打开这个配置之后,访问蝉知系统,可以通过火狐或者chrom的开发者工具来查看页面的输出。 比如这个图里面的输出,content-encoding: gzip

Magento multilanguage - double change in language resuts in 404 (or how to change language within stores not views)

强颜欢笑 提交于 2019-12-10 06:28:33
问题 I have a problem with a magento installation. I used Magento ver. 1.5.0.1, community edition to develop this website http://cissmarket.com/. The problem appears when I change the language from the EU version to French and after that to German. The change to french is ok, but when in the same page i change to German i receive a 404 error. Also this is generation 404 errors in the Google webmaster tools and when i try for example to take this link and paste it in the browser it gives me also a

How implement SEO (Metatags) in Angular 2 (with Angular universal for rendering on server side)?

杀马特。学长 韩版系。学妹 提交于 2019-12-10 03:52:11
问题 I'm searching a fully working example about SEO or Metatags with Angular 2 using Angular universal to render on server side (to be recognize by facebook, twiter, and other metatags) but I had not success.. I found multiple articles, but there are incomplete (no all source code is available) or oldest (not compile with the latest versions): a) blog.devcross.net/2016/04/17/angular-2-universal-seo-friendly-website/ NOTE: Excelent post with source code, but It's not working. b) builtvisible.com

Dynamic robots.txt

旧城冷巷雨未停 提交于 2019-12-10 01:52:58
问题 Let's say I have a web site for hosting community generated content that targets a very specific set of users. Now, let's say in the interest of fostering a better community I have an off-topic area where community members can post or talk about anything they want, regardless of the site's main theme. Now, I want most of the content to get indexed by Google. The notable exception is the off-topic content. Each thread has it's own page, but all the threads are listed in the same folder so I

AngularJS / AJAX app and search engine crawlers

匆匆过客 提交于 2019-12-10 00:01:17
问题 I've got a web app which heavily uses AngularJS / AJAX and I'd like it to be crawlable by Google and other search engines. My understanding is that I need to do something special to make it work, as described here: https://developers.google.com/webmasters/ajax-crawling Unfortunately, that looks quite nasty and I'd rather not introduce the hash tags. What I'd like to do is to serve a static page to Googlebot (based on the User-Agent), either directly or by sending it a 302 redirect. That way,

Redirect WWW to non WWW, or the other way around? [closed]

China☆狼群 提交于 2019-12-09 14:42:38
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . Ive just ran an seo audit on my site and received this message... Be sure that www.mysite.co.uk and myside.co.uk are not running in parallel. Redirecting requests from a non-preferred hostname is important

Building SEO-friendly URLs for accented characters

心已入冬 提交于 2019-12-09 13:23:04
问题 We are making our site an SEO-friendly site by following the pattern below: http://OurWebsite.com/MyArticle/Math/Spain/Glaño As you see, Glaño has a spelling character that search engines may not like it. On the other hand we cannot build up the last URL! Any suggestions to maintain our current URL generation code to handle Spanish or French entries or we need to change our approach? 回答1: Try these functions: function Slug($string, $slug = '-', $extra = null) { return strtolower(trim(preg

What's the correct way to hide the <h1> tag and not be banned from Google?

≡放荡痞女 提交于 2019-12-09 07:48:25
问题 The website I am working on uses an image defined in CSS as the main logo. The html code looks like this: <h1>Something.com | The best something ever</h1> I would like to display just the image defined in CSS and pass the information from the h1 tag to the search enginges only. What's the correct way to do this? Google is very strict about this, I know that display:none is wrong, what about visibility: hidden ? Thanks in advance! 回答1: You should be fine with visibility: hidden . That said, if