目录
TDK
增加超链接
外链
引流
H标签
nofollow
ALT
企业网站优化方向
最如何学习SEO
TDK
网站上线首先需要百度收录,这时候需要增加自己网站搜索权重,TDK占比40%,所以要设置一个好的TDK可以有效提高网站的访问量,这里是一个vue+spring项目,在vue中增加TDK
1、装插件
npm install --save vue-meta
2、main引用并配置
import VueMeta from 'vue-meta'Vue.use(VueMeta, { keyName: 'metaInfo', refreshOnceOnNavigation: true});
3、在views/下每个模块主页面添加,如果要动态添加啥的,你也可以自己配,格式知道就行了
export default { metaInfo(){ return { title: "南京市江宁区金瑞祥贴金工艺厂", meta: [ { name:"keywords", content: '贴金,刻字,佛像,金瑞祥' },{ name:"description", content: ' "法人名称:南京市江宁区金瑞祥贴金工艺厂 注册时间2013年1月16日 主要经营产品:贴金装潢、佛像贴金、大理石贴金、庙宇装潢、酒店贴金、金字招牌、贴金工艺品、网站制作。联系电话:13814529300 ",' } ] } },}
结果如下:
第二种方法,使用原生js操作
// The Vue build version to load with the `import` command// (runtime-only or standalone) has been set in webpack.base.conf with an alias.import Vue from 'vue'import App from './App'import router from './router'import './assets/css/global.css'import ElementUI from 'element-ui'import 'element-ui/lib/theme-chalk/index.css'import API from './api'Vue.use(ElementUI)// 导入iconfrontimport './assets/font/iconfont.css'import token from './token/token.js'import constant from './constant/index.js'import filters from './filters/index.js'Vue.prototype.getToken = token.isLoginTokenVue.prototype.setToken = token.setTokenVue.prototype.$constant = constantObject.keys(filters).forEach(k => Vue.filter(k, filters[k]))Vue.prototype.$API = API// import VueMeta from 'vue-meta'Vue.config.productionTip = false// Vue.use(VueMeta, {// refreshOnceOnNavigation: true// });/* eslint-disable no-new */new Vue({ el: '#app', router, components: { App }, template: '<App/>',})document.title = "南京市江宁区金瑞祥贴金工艺厂"let meta1 = document.createElement('meta');let meta2 = document.createElement('meta');meta1.name = 'description'meta1.content = '法人名称:南京市江宁区金瑞祥贴金工艺厂 注册时间2013年1月16日 主要经营产品:贴金装潢、佛像贴金、大理石贴金、大理石刻字、庙宇装潢、酒店贴金、金字招牌、贴金工艺品、网站制作。联系电话:13951638402'document.getElementsByTagName('head')[0].appendChild(meta1);meta2.name = 'keywords'meta2.content = '贴金,刻字,佛像'document.getElementsByTagName('head')[0].appendChild(meta2);// router.beforeEach((to, from, next) => {// if (to.meta.content) {// let meta1 = document.createElement('meta');// let meta2 = document.createElement('meta');// meta1.content = to.meta.content.description// meta1.name = 'description'// document.getElementsByTagName('head')[0].appendChild(meta1);// meta2.content = to.meta.content.description// meta2.name = 'description'// document.getElementsByTagName('head')[0].appendChild(meta2);// }// next()// });
增加超链接
外链
引流
百度有绿萝算法,低质量外链很容易被检测到,可以使用如下
H标签
nofollow
不要浪费权重在我的联系方式等上面,没必要
ALT
比较重要
企业网站优化方向
最如何学习SEO
B站推荐SEO的入门教程:全套SEO优化学习教程