其它新闻

若何让你的网站谄谀搜刮引擎

2019-02-11 20:47:000admin

  经过将近2年网络营销推广的反复实践,并根据http://www.google.com/webmasters/guidelines.html,总结出一些目前针对搜索引擎进行网站百度推广搜索优化的精华要点,希望对大家有所帮助。

1. 尽量以作为代码的开始端,并模块化javascript和CSS,尽量使用include使之独立与HTML页面。 2. 如果网站内容的访问需要会员登陆或者有密码保护,请开放给搜索引擎的Spider或者Robot。 3. 如果网站的内容是用PHP,ASP或者JSP等script动态生成的,需要通过Apache的Mod_Rewrite或PHP的Path_Info进行URL重写和百度推广搜索优化,以便做成类似静态页面的URL。如:可以把http://www.domain.com/article?id=123&cat=abc映射成为http://www.domain.com/article/123/abc或http://www.domain.com/article_123_abc.htm。 4. 尽量避免不必要的跳转和重定向页面或会产生3xx的类似机制。 5. 保持HTML中标签中的内容与真实文章或内容的标题保持一致,并尽量做到每个页面的唯一性。 6. 使用<H1>和<H2>标签来表示真实文章或内容的标题和副标题,如果为了保持美观,请使用CSS进行定义。 7. 尽量保持每个<IMG>标签中有ALT属性,而且最好所有的ALT属性都有内容。 8. 建立一个结构清晰和有意义的网站导航页面。 9. 在网站的根目录建立一个robot.txt文件,如果对搜索引擎没有任何特殊要求,则内容为*;或者加入对搜索引擎要求的一些script。 10. 尽量不要使用frame结构来呈现网站。 11. 尽量使网站的代码符合W3C的HTML 4.0或XHTML 1.0规范。 12. 对网站比较主要的内容或学术文章,尽量转换成PDF格式。因为PDF格式的文件天生的Page Rank就是3。 13. 尽量使网站的结构趋向于扁平化,最好不要超过3层。</p> <!--content_e--> <div class="cle"></div> <!----> <!----> <div class="cle"></div> </div> <!--endprint--> <div class="cle"></div> <div class="nets plr20"> <div>话题:<i class="pr10"><a href="/index.php?s=tag&name=sousuoyinqing" title="搜索引擎" target="_blank">搜索引擎</a></i><i class="pr10"><a href="/index.php?s=tag&name=sousuoyouhua" title="搜索优化" target="_blank">搜索优化</a></i><i class="pr10"><a href="/index.php?s=tag&name=baidutuiguang" title="百度推广" target="_blank">百度推广</a></i></div><p>上一篇:<a href="https://www.ahkuxun.cn/show-1830.html">网站设计办事 淮南网站设计办事</a></p><p>下一篇:<a href="https://www.ahkuxun.cn/show-1832.html">收集营销的十项本能机能</a></p> <div class="cle"></div> </div> </div> <div class="cle"></div> <div> <!--此标签用于调用相关文章,tag=关键词1,关键词2,多个关键词,分隔,num=显示条数,field=显示字段--> <div class="plr10 ptb20"> <div class="f22 ir8 pl10"> <i class="ic2 ifont ic2-dongtai fl pt5"></i><span>相关新闻</span> </div> <div class="cle"></div> <div class="lin2x6 f16 plr0 c333 xxgk il5 mt20"> <li class="rel dblock plr30 lin2x8"><a class="dblock" href="https://www.ahkuxun.cn/show-1768.html"><div class="w85 over rel fl lin1h">网站设计公司 淮南网站设计公司</div><div class="w15 rel fr text_r f16">2019-03-03</div> <div class="cle"></div> </a></li> </div> </div> </div> </div><!--box_l end--> <div class="cle"></div> </div> </div> <!--cone--> <div class="cle"></div> <!--bodye--> <div class="allbox rel"> </div> <div class="cle"></div> <!--尾部--> <div class="allbox foot cfff lin2x2 f16 text_c rel z123 rel"> <div class="footc pb50"> <div class="w1400 pt15 ftinfo"> <div class="w40 fl ilr5 text_l pl30 pt10 pr10 lin2x"> <p>业务咨询:18154006436</p> <!--<i></i>服务热线:0554-5359879--> <p></p> <p> </p> <div class="cle"></div> <p>公司地址:安徽省淮南市田家庵区万达广场A2栋701<br/>专注医院网站开发建设,追求高效运维极致体验</p> <div class="cle"></div> <p>Copyright © 2026<i></i>安徽酷讯网络科技有限公司</p> </div> <div class="col3 w30 plr50 fl pic100 lin2x6 pt10" style="border-left:1px solid #202a4b; border-right:1px solid #202a4b"> <li class="li3 fr dblock over plr5"><span class="h0 over dblock pbx100"><img src="https://www.ahkuxun.cn/index.php?s=api&c=api&m=qrcode&thumb=&text=https%3A%2F%2Fwww.ahkuxun.cn%2F&size=5&level=H"></span>手机版</li> <div class="cle"></div> </div> <div class="w20 fr lin1x4"> <p class="">服务热线</p> <p class="f38 b"> 0554-5359879 </p> <p>周一至周六:9:00--18:00</p> <div class="ttbn br35 lin2x f22 plr20 mt10 bg333 cfff w70 mauto">联系在线客服</div> </div> <div class="cle"></div> </div> <div class="cle"></div> <div class="bga0002 abs bottom0 allbox mt30 f14"> <div class="w1400"> <span class="pr15"><a href="https://www.ahkuxun.cn/">安徽酷讯网络科技有限公司</a></span> <span class="pr15"><i class="ifont ic3 ic3-ICP f20 y_m"></i><a target="_blank" href="//beian.miit.gov.cn/">皖ICP备2023001502号-4</a></span> </div> </div> </div> </div> <div class="kefu_ck fix f14 lin1x2 text_c bsha z123 br10 over c333 bgafff9 z123456"> <li class="dblock w100"> <a href="javascript:;" class="pt5 pb10 dblock chat"> <i class="icon ifont icon-duihua f28"></i> <div class="cle"></div> <span>在线客服</span> <div class="cle"></div> </a> </li> <li class="dblock w100"> <a href="https://work.weixin.qq.com/kfid/kfc7900213c8cf24bb5" target="_blank" class="pt5 pb10 dblock "> <i class="ic3 ifont ic3-weixin1 f28"></i> <div class="cle"></div> <span>微信客服</span> <div class="cle"></div> </a> </li> <li class="dblock w100 kfboom"> <a href="javascript:gotoTop();" class="dblock ptb5"> <i class="f32 ifont iconw-zhuomian- iconw"></i> <div class="cle"></div> </a> </li> </div> <script type="text/javascript" src="https://sc.ahkuxun.cn/js/top.js"></script> <script type="text/javascript" src="https://sc.ahkuxun.cn/js/scrollReveal.min.js"></script> <script>window.scrollReveal = new scrollReveal({reset:true})</script> <style> .fubd{ width:900px; height:auto;margin-left:-450px;} .jianbd { width:420px; height:auto; margin-left:-210px} .kfewmbox{height:auto;width:600px; margin-left:-300px;} .pubewmbox{height:auto;width:600px; margin-left:-300px;} </style> <!--底部悬浮--> <div class="tcform"> <div class="fu_bg kfewmbox br10 bgfff over fix dnone br10 bgafff9"> <div class="fu_c"> <div class="fuhead"> <div class="tit-bd cfff f28 ptb30 text_c">咨询客服</div> <div class="cle"></div> </div> <div class="ge20"></div> <div class="mauto lin3x dpbx100 pic100 text_c col3_mr25 w80"> </div> <a href="javascript:;" class="bd-off abs am05 top0 right0 mr5 mt5"><i class="iconw iconw-guanbi ifont cfff f32"></i></a> <div class="cle"></div> </div> </div> <div class="fu_bg pubewmbox br10 bgfff over fix dnone br10 bgafff9"> <div class="fu_c"> <div class="fuhead"> <div class="tit-bd cfff f28 ptb30 text_c">媒体距阵</div> <div class="cle"></div> </div> <div class="ge20"></div> <div class="mauto lin3x dpbx100 pic100 text_c col3_mr25 w80"> </div> <a href="javascript:;" class="bd-off abs am05 top0 right0 mr5 mt5"><i class="iconw iconw-guanbi ifont cfff f32"></i></a> <div class="cle"></div> </div> </div> </div> <script> $(function() { // DOM就绪后执行 // 通用弹窗函数 function openLayer(options) { layer.close(layer.index); const config = $.extend({ title: false, closeBtn: 0, type: 1, anim: 0, offset: '40%', shadeClose: true, success: (layero, index) => { layero.find('.bd-off').data('layerindex', index); } }, options); return layer.open(config); } // 初始化默认值 function initDrTitle() { $('.fubd').each(function() { const $fubd = $(this); const $firstListA = $fubd['find']('.list-a').first(); if ($firstListA['length']) { // 修改点:获取第一个a标签的data-title属性 const $firstAnchor = $firstListA['find']('a').first(); const titleValue = $firstAnchor['attr']('data-title')?.replace(/[“”]/g, '') || ''; $fubd['find']('#dr_title').val(titleValue); } }); } // 初始化默认值 initDrTitle(); // 事件委托统一处理点击 $(document) .on('click', '.jian_a', function() { const titleValue = $(this).attr('title')?.replace(/[“”]/g, '') || ''; openLayer({ content: $('.jianbd'), success: (layero,index) => { layero.find('#dr_title').val(titleValue); $('.jianbd').find('.bd-off').data('layerindex', index); } }); }) .on('click', '.kfewm', function() { openLayer({content: $('.kfewmbox')}); }) .on('click', '.pubewm', function() { openLayer({content: $('.pubewmbox')}); }) .on('click', '.fu_a', function() { openLayer({content: $('.fubd')}); }) .on('click', '.bd-off', function() { layer.close($(this).data('layerindex')); }) .on('click', '[data-title]', function(e) { // 移除同组内其他元素的active类 $(this).closest('.list-a').find('.active').removeClass('active'); // 给当前点击元素添加active类 $(this).addClass('active'); // 阻止事件冒泡,避免触发父元素无关事件 e.stopPropagation(); // 获取data-title属性值,同步原有代码的引号处理逻辑 const titleValue = $(this).attr('data-title')?.replace(/[“”]/g, '') || ''; // 替换为实际外部大容器的选择器,如原代码中的.fubd const $outerContainer = $(this).closest('.fubd'); if ($outerContainer['length']) { // 赋值到容器内的#dr_title输入框 $outerContainer['find']('#dr_title').val(titleValue); } }); }); //底部悬浮带动效 $(function(){ $(".bd-off").click(function(){ $(this).parents(".xfbd").animate({width: 0},300,function(){ $(this).hide(); $(this).siblings(".xf_a").show().animate({left: 0},300); $("#xf_ck").show().animate({height: 0},300); }); }); $(".xf_a").click(function(){ $(this).animate({left: "-229"},300,function(){ $(this).hide(); $(this).siblings(".xfbd").show().animate({width: "100%"},300); $("#xf_ck").show().animate({height: 120},300); }); }); }); </script><script> function triggerCustomerService() { const targetBtn = document.getElementById('launchYYButton'); targetBtn?.click(); // 安全调用 } document.addEventListener('DOMContentLoaded', () => { // 事件委托实现 document.body.addEventListener('click', (event) => { if (event.target.closest('.chat')) { // 支持子元素触发 triggerCustomerService(); } }); }); </script> <script> (function(a, b, c, d) { let s = b.createElement("script"); s.async = true; s.src = "https://outyingyuchatweb.yingyuchat.com/static/js/warbler-front.js"; s.onload = s.onreadystatechange = function () { if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") d(c); };b.head.appendChild(s); })(window, document,"https://work.yingyuchat.com",function(u){ WARBLER.init({ WARBLER_URL:u, WARBLER_KEFU_ID:"qq2282437452", WARBLER_ENT:"10097", WARBLER_SIZE:"400px 560px", WARBLERLANG:"cn" }) }); </script> <style> .yingyuchatui,.launchYYButtonBox,.launchMButtonBox,.launchYYButtonNotice{ display: none !important;} .kfdraggable{height:5px !important} .layui-icon{ font-size:32px;} .khkefu .layui-kflayer-setwin .layui-kflayer-close1{margin-top:0} .layui-kflayer-setwin a{width:26px; height:26px;} .launchYYIcon{left:unset;right:0px;margin-right:5px;} </style> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?7d83fcb6aa06f95f071affe99bec85aa"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script><!--补充css--> <style> </style> <!--supplemnet--> <style> .sh{font-family: unset} .hnavc{padding-top:0; } .hnav .logo{height: 120px;} .hnav .navbox{margin-top:35px;} .hnav {background: rgba(0, 0, 0, .3);border-bottom: 1px solid rgba(255, 255, 255, 0.15); transition: all 0.5s ease;} .hnav.fixed{height:auto; color: #333; background: rgba(255, 255, 255, 1); box-shadow: 0 15px 32px rgb(0 0 0 / 15%);} .hnav .hnavc .w30,.hnav.fixed .hnavc .w30{width:45%;text-align:left;} .hnav .hnavc .w70,.hnav.fixed .hnavc .w70{width:55%} .hnav.fixed .w1200.heads{width:1400px;} .hnav.fixed .logo{float: left; width: auto; height: 90px;} .hnav.fixed .navbox{margin-top:20px;} .hnav.fixed .navbox .navs{width:100%} .fixed .navbox{background:none} .hnav.fixed a{color:#333} .navs li:hover h3 a, .navs .on h3 a{background:none} /*菜单*/ .hnav img.logo1{ display:none; visibility:hidden;} .hnav.fixed img.logo2{ display:none; visibility:hidden;} .hnav.fixed img.logo1{ display:inline; visibility:inherit} .navs li h3{transition:all 0s linear;} .navs li h3 a:before {position: absolute; content: "";width: 0;left: 50%; height: 2px;bottom: 0; transform: translateX(-50%);transition: all ease-in-out 0.36s; background:#FFF} .navs li h3:hover a:before {width: 60%;} .hnav.fixed .navs li h3 a:before {position: absolute; content: "";width: 0;left: 50%; height: 2px;bottom: 0; transform: translateX(-50%);transition: all ease-in-out 0.36s; background:#3185FE} .hnav.fixed .navs li h3:hover a:before {width: 60%;} .hnav.fixed .navs li:hover h3 a,.hnav.fixed .navs .on h3 a{color:#333} .layui-layer{ background:rgba(0,0,0,.8);color:#fff} .s_input{border:solid 1px #ddd;border-radius:20px 0 0 20px} .type{ background: url() no-repeat center center fixed; background-size:cover} .share_p .box_l{padding:30px 0px;} .share_p.tp8 .box_l{background: url(http://sc.ahkuxun.cn/css/img/caise/332.png) 95% 100px no-repeat #fff;background-size:250px auto;} .share_p.tp11 .box_l{background: url(http://sc.ahkuxun.cn/css/img/caise/065.png) 95% 100px no-repeat #fff;background-size:250px auto;} .tit-i h3{font-weight:600; font-size:38px;} .tit-i h5{ font-size:18px; color:#666; } .ttbn{background:rgba(49,133,254,1)} .ttbn:hover{background:rgba(49,133,254,.8)} .ttbn2{background:rgba(255,150,0,1)} .ttbn2:hover{background:rgba(0,49,131,1)} .kefu_ck{bottom:unset;top:20%;width:90px;} .kefu_ck .icon{font-size:32px;} .kefu_ck li a{ padding:15px 0;} .bsha { box-shadow: 0px 2px 8px rgba(0,0,0, 0.15); } .sbbn .hd li{background: #ecf3fe;} .sbbn .hd .on{ background:#3185FE;box-shadow: 0 3px 10px #1a73e833;} .sbbn .hd .on a{color:#fff} .sbbn .bd li span{color:#3185FE;} .sbbn .bd li:hover{background:#3185FE; color:#fff;box-shadow: 0 5px 10px #1a73e833;} .sbbn .bd li:hover span{color:#fff} .sbbn .bd li:hover b{color:#fff} .sbbn2 .hd li.on{background: url("//sc.ahkuxun.cn/css/img/jt/jt36.png") no-repeat right center;background-size: auto 100%;} .sbbn2 .hd li a{background: #fff;} .sbbn2 .hd li.on a{background:#3185FE;box-shadow: 0 3px 10px #1a73e833;} .sbbn2 .hd li.on a{color:#fff} /*样机*/ .myj{box-shadow:0px 0px 5px rgba(49,133,254,.3); border:1px solid rgba(0,0,0,.1)} .myj .yj_nav{filter: drop-shadow(0px -1px 3px rgba(0, 0, 0, 0.1))} /*品牌滚动两端白色渐隐*/ .gd_box::before,.gd_box::after {content: "";position: absolute;top: 0; bottom: 0; width: 10%; z-index: 2; pointer-events: none;} .gd_box::before {left: 0;background: linear-gradient(to right, #fff, transparent);} .gd_box::after {right: 0;background: linear-gradient(to left, #fff, transparent);} .pbann .text1{font-weight:bold; font-size:48px;} .pbann .text1 .f16{ font-weight:400;} .tit-i h3 span { position: relative; /* 为伪元素绝对定位提供参照 */ padding-left: 20px; /* 预留伪元素空间,避免覆盖文本 */ text-transform: uppercase; } .tit-i h3 span::before { content: ""; /* 伪元素必须设置content才能生效 */ position: absolute; left: 4px; /* 定位到元素左侧 */ top: 50%; /* 垂直居中对齐 */ transform: translateY(-50%); width: 8px; height: 8px; background-color: #ccc; /* 实心圆颜色,可自定义 */ border-radius: 50%; /* 将方形转化为正圆形 */ } </style> <script> // 完全独立封装,不依赖任何全局变量,与现有代码零冲突 ;(function() { // 1. 配置参数(仅需修改这里) const CONFIG = { TRIGGER_ELEMENT: '.hnav', // 监听类名变化的目标元素选择器 TARGET_IMG_SELECTOR: '.hnav img', // 需要切换的图片选择器(可根据实际调整) TRIGGER_CLASS: 'fixed', // 触发切换的类名 NEW_IMG_SRC: 'https://www.ahkuxun.cn/uploadfile/2025/08/cb08496781a70.png' // 切换后的图片地址 }; // 2. 初始化元素与状态 const triggerEl = document.querySelector(CONFIG.TRIGGER_ELEMENT); const targetImg = document.querySelector(CONFIG.TARGET_IMG_SELECTOR); let originalImgSrc = null; // 用于存储原始图片地址,无需手动设置 // 3. 核心状态同步函数 function syncImageState() { // 安全防护:元素不存在时直接返回 if (!triggerEl || !targetImg) return; // 首次执行时保存原始图片地址 if (!originalImgSrc) { originalImgSrc = targetImg.src; } const hasTriggerClass = triggerEl.classList.contains(CONFIG.TRIGGER_CLASS); // 仅当状态实际变化时才修改图片地址,避免无效操作 if (hasTriggerClass && targetImg.src !== CONFIG.NEW_IMG_SRC) { targetImg.src = CONFIG.NEW_IMG_SRC; } else if (!hasTriggerClass && targetImg.src !== originalImgSrc) { targetImg.src = originalImgSrc; } } // 4. 监听类名变化(与原有scroll事件完全解耦) function setupObserver() { // 浏览器兼容性检查 if (!window.MutationObserver || !triggerEl) return; const observer = new MutationObserver((mutations) => { mutations.forEach(mutation => { // 仅当class属性变化时执行同步 if (mutation.attributeName === 'class') { syncImageState(); } }); }); // 配置监听:只关注class属性变化,性能最优 observer.observe(triggerEl, { attributes: true, attributeFilter: ['class'], subtree: false }); // 可选:提供销毁方法,用于单页应用路由切换时清理 window.destroyImageSyncObserver = function() { observer.disconnect(); }; } // 5. 初始化执行 document.addEventListener('DOMContentLoaded', () => { // 页面加载完成后立即检查初始状态 syncImageState(); // 启动监听 setupObserver(); }); })(); </script><!--supplement--> <!--EEEE--> </div> </div> </div> <!--EEEE--> </body> </html>