博客

  • seo优化网站的关键

    小编认为优化网站除了作弊以外基本没什么捷径可以走至少避免一些seo优化的禁忌,很多人都把想的过于简单其实一些seo禁忌我们还是要避免的,想着只需要把几个产品关键词优化到首页就行了吗?。网站优化中需要注意许多细节,特别是网站内部代码优化细节,这些细节在建站时就应该考虑到。以下方法也是小编参考网上的经验。
     
    一:FLASH对seo的影响

    看过很多企业电子商务网站,普片存在的一个现象是都过度的使用flash。原因很简单,吸引访客,提高站点的转化率,一味的最求美观,其实美观完全可以使用jquery来实现了FLASH在未来不久就会被淘汰。FLASH加载速度慢不利搜索引擎搜索,必定会被未来的html5所取代。

    做seo的人都应该清楚的了解到导航的重要性,导航是传递权重、指引搜索引擎爬行的敏感地带。而将如此重要的地带使用对搜索引擎不友好的Flash。遇到这样的站点,笔者认为seoer应该与设计师沟通,让他们换成DIV+CSS的导航。
     
    二、图片是否优化过

    一般企业电子商务网站用来展示或销售自己的产品,对于这样的网站会填充着大量的图片,这些图片也需要进一步优化。首先是图片ALT属性,必不可少的工作,最好在图片下面加一行说明。其次是图片格式,如果对图片质量要求不高,建议用png格式,提高页面的加载速度。
     
    三:过度使用Table

    简单点说:table编辑网站比较简单,兼容性也要好于div+css布局。但我想说的是table与div+css相比,table不利于搜索引擎优化,加上后期的修改也是一件大工程div+css布局必定取代Table。
     
    四:站点的地址是否统一标准

    对于网站URL的标准,一般就两个方面:

    1、页面URL的唯一性,以免造成权重分散的情况,甚至遭到搜索引擎惩罚。

    2、URL地址过长,很多电子商务网站会出现地址过长的问题,过长的地址对搜索引擎和用户都不友好,我们需要进行适当的减缩。

  • WordPress如何修改自定义对SEO友好的固定链接

    很多做seo的站长都注意到网站的固定链接多seo有影响,其实小编觉得很有道理,有时候我们在百度搜索关键字的时候网站链接部分也会被重点搜索出来例如本站一样,

    2

     

    在搜索关键字“wordpress 固定链接”的时候不仅标题搜索的到内容和固定链接也被搜索出来,所以小编认为固定链接设置为中文比较适合也就是与文章标题一样这样更有利被百度搜索,每个人都有自己优化网站的方法小编也只是谈谈自己的想法而已。

    这里有两篇关于修改wordpress固定链接的方法:

    https://sdeno.com/如何自定义wordpress固定链接/
    https://sdeno.com/wordpress修改固定链接在西部数码的实现/

  • wordpress做404跳转与seo

    很多做网站的人都知道404是错误指向页面,当用户请求的内容不存在时候页面就自动统一的转向404错误页面这种是友好提示,但是很多人都不知道404的自动跳转与seo有关联吧!

    小编推荐一个smart404这个插件,其功能是,根据用户搜索点击的URL,将用户自动转到最相关的内容页上。小编觉得这个方法比较适用于之前做过大规模url结构变更,但是未做好301转向的网站。当然很多也会用.htaccess加404页面的方法来实现跳转,同时可以自定义404页面,尽最大可能弥补用户感受。

    最后说一点,做404错误跳转一定不要直接转向到网站首页,这将导致首页不被收录。

  • Baidu Sitemap Generator工具404错误解决方案

    sitemap.html 出现404。这里不介绍Baidu Sitemap Generator工具的安装重点介绍在win系统使用伪静态的情况下安装Baidu Sitemap Generator访问sitemap.html时出现的404错误的解决方法。

    1,找到伪静态规则文件httpd.conf,在其中添加以下两行代码:

    加载的位置很重要

    [code][ISAPI_Rewrite]

    # 3600 = 1 hour

    CacheClockRate 3600 RepeatLimit 32

    # Protect httpd.ini and httpd.parse.errors files

    # from accessing through HTTP # wordpress

    # For tag RewriteRule /tag/(.*)/page/(\d+)$ /index\.php\?tag=$1&paged=$2

    RewriteRule /tag/(.+)$ /index\.php\?tag=$1

    # For category RewriteRule /category/(.*)/page/(\d+)$ /index\.php\?category_name=$1&paged=$2

    RewriteRule /category/(.*) /index\.php\?category_name=$1

    # For sitemapxml RewriteRule /sitemap.xml /sitemap.xml [L]

    RewriteRule /favicon.ico /favicon.ico [L]

    # For file-based wordpress content (i.e. theme), admin, etc.

    RewriteRule /wp-(.*) /wp-$1 [L]

    # For normal wordpress content, via index.php

    RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]

    RewriteRule /sitemap.html /sitemap.html [L]

    RewriteRule ^/$ /index.php [L]

    RewriteRule /(.*) /index.php/$1 [L][/code]

    其实重点是加上

    [code]RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]

    RewriteRule /sitemap.html /sitemap.html [L][/code]

    小编我要多说下以上方法可能有些人能成功可能有些人不能成功,小编我用的空间默认伪静态规则文件httpd.conf代码如下:

    [code]RegistrationName= wlqcwin
    RegistrationCode= 2EAD-35GH-66NN-ZYBA

    [ISAPI_Rewrite]
    # 3600 = 1 hour
    CacheClockRate 3600
    RepeatLimit 32

    #默认包含了301设置,此设置情况下cctv.com/aa.htm 会301跳至www.cctv.com/aa.htm,将cctv.com替换为您自己的域名就能实现自己的域名的301
    RewriteCond %{HTTP:Host} ^cctv.com$
    RewriteRule (.*) http://www.cctv.com$1 [NC,R=301]

     

    #Discuz ! x和discuz x1.5伪静态规则,若不需要或与您的网站程序有冲突可以删除。
    #如果你的网站是discuz!x就把以下几行前面的#号删除,然后把duoduo 淘宝客 以下的规则全部删除,二者有冲途!
    #RewriteRule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
    #RewriteRule ^(.*)/article-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=article&articleid=$2&$3
    #RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
    #RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
    #RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
    #RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
    #RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4

    # duoduo 淘宝客 Rewrite规则
    RewriteRule ^/index\.html$ /index\.php
    RewriteRule ^/sitemap\.html$ /sitemap\.php
    RewriteRule ^/malllist\.html$ /malllist\.php
    RewriteRule ^/shoplist\.html$ /shoplist\.php
    RewriteRule ^/article\.html$ /article\.php
    RewriteRule ^/user/center\.html$ /user/center\.php
    RewriteRule ^/mall-(.*)-(.*)-(.*)\.html$ /mall\.php\?id=$1&act=$2&page=$3
    RewriteRule ^/mall-(.*)-(.*)\.html$ /mall\.php\?id=$1&act=$2
    RewriteRule ^/mall-(.*)\.html$ /mall\.php\?id=$1
    RewriteRule ^/view-(.*)-(.*)\.html$ /view\.php\?iid=$1&page=$2
    RewriteRule ^/view-(.*)\.html$ /view\.php\?iid=$1
    RewriteRule ^/malllist-(.*)-(.*)-(.*)\.html$ /malllist\.php\?catid=$1&mall=$2&page=$3
    RewriteRule ^/article_list-(.*)-(.*)\.html$ /article_list\.php\?cid=$1&page=$2
    RewriteRule ^/article_list-(.*)\.html$ /article_list\.php\?cid=$1
    RewriteRule ^/read-(.*)\.html$ /read\.php\?id=$1
    RewriteRule ^/list-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /list\.php\?cid=$1&start_price=$2&end_price=$3&sort=$4&area=$5&guarantee=$6&list=$7&q=$8&page=$9
    RewriteRule ^/shop-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /shop\.php\?nick=$1&start_price=$2&end_price=$3&sort=$4&area=$5&guarantee=$6&list=$7&q=$8&page=$9 [NU]
    RewriteRule ^/shoplist-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /shoplist\.php\?cid=$1&keyword=$2&start_level=$3&end_level=$4&area=$5&px=$6&cpr=$7&type=$8&page=$9 [NU]
    RewriteRule ^/shoplist-(.*)\.html$ /shoplist\.php\?cid=$1
    RewriteRule ^/shop-(.*)\.html$ /shop\.php\?nick=$1 [NU]
    RewriteRule ^/list-(.*)\.html$ /list\.php\?cid=$1
    RewriteRule ^/list\.html$ /list\.php
    RewriteRule ^/huangou-(.*)\.html$ /huangou\.php\?id=$1
    RewriteRule ^/huan-(.*)-(.*)\.html$ /huan\.php\?keyword=$1&page=$2 [NU]
    RewriteRule ^/huan\.html$ /huan\.php
    RewriteRule ^/coupons-(.*)-(.*)\.html$ /coupons\.php\?cid=$1&page=$2
    RewriteRule ^/coupons\.html$ /coupons\.php
    RewriteRule ^/cuxiao-(.*)\.html$ /cuxiao\.php\?id=$1
    RewriteRule ^/tg-(.*)-(.*)-(.*)-(.*)-(.*)\.html$ /tg\.php\?city_id=$1&catid=$2&mallid=$3&keyword=$4&page=$5 [NU]
    RewriteRule ^/tg-(.*)-(.*)-(.*)-(.*)\.html$ /tg\.php\?city_id=$1&catid=$2&mallid=$3&page=$4
    RewriteRule ^/tg-(.*)-(.*)-(.*)\.html$ /tg\.php\?city_id=$1&catid=$2&mallid=$3
    RewriteRule ^/tg-(.*)\.html$ /tg\.php\?city_id=$1
    RewriteRule ^/tg\.html$ /tg\.php
    RewriteRule ^/tgview-(.*)\.html$ /tgview\.php\?id=$1[/code]

    也就是把其中的

    [code]RewriteRule ^/sitemap\.html$ /sitemap\.php[/code]

    替换为

    [code]RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]

    RewriteRule /sitemap.html /sitemap.html [L][/code]

    方法类似不明白的可以留言联系本人

  • WordPress删除并禁用历史修订功能

    大家发现每次修改文章的时候下面总是记录着我们修改的历史,小编认为个人博客添加这功能是不是多余啊没有必要在说也浪费空间,小编我的数据库空间也是有限制的所以必须禁用。

    1,打开 WordPress 根目录下的 wp-config.php 文件,添加下面的代码即可:

    [code]define(‘WP_POST_REVISIONS’, false);[/code]

    2,删除 WordPress 已有的文章修订记录

    上面也说过,WordPress 文章的修订记录,都是被写入了数据库,所以我们需要删除MySQL数据库中有关的语句!执行以下SQL语法 如下(直接删除即可):

    [code]DELETE FROM wp_postmeta WHERE post_id IN (SELECT id FROM wp_posts WHERE post_type = ‘revision’);
    DELETE FROM wp_term_relationships WHERE object_id IN (SELECT id FROM wp_posts WHERE post_type=’revision’);
    DELETE FROM wp_posts WHERE post_type=’revision’;[/code]

    以后在wordpress写文章十,将不会产生历史记录,所以数据库也不会变的庞大!