codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

Essential Guide to Improve SEO in Single Page Application Vue.js

Alan Ktquez
codeburst
Published in
12 min readSep 13, 2018

What will I do to make my site look good on Google?

Solutions For SPAs Vue.Js

SSR (Server Side Rendering)

Prerender

Static sites

Tips To Improve Your Site’s SEO

Friendly URL / History Mode

https://domain.com/#/about/
const router = new VueRouter({
mode: 'history',
routes: [...]
})
https://domain.com/about/

Metadados (Head Tags)

Viewport

<meta name="viewport" content="width=device-width, initial-scale=1">

Title of the page (tag title)

export default {
name: 'MyViewComponent',
head: {
title: {
inner: `Men's Watches`,
separator: '|',
complement: 'World of Watches'
}
...
export default {
name: 'MyViewComponent',
metaInfo: {
title: `Men's Watches`,
titleTemplate: '%s | World of Watches',
...
<title>Men's Watches | World of Watches</title>

Description (Meta description)

export default {
name: 'MyViewComponent',
head: {

meta: [
{ name: 'description', content: `Watches: Men's watches, brand name watches, discount watches, watches on sale, mens watch brands and ladies watches. Daily Deals on Men's watches &amp; watches for women + the best service guarantee.` }
]
...

Canonical tag

https://mydomain.com/#/about/
https://mydomain.com/?_escaped_fragment_=about
<link rel='canonical' href='https://mydomain.com/#/about/' />
https://mydomain.com/posts?page=2
<link rel='canonical' href='https://mydomain.com/posts/' />
<link rel='canonical' href='https://mydomain.com/posts/?page=2' />
export default {
name: 'MyViewComponent',
head: {

link: [
{ rel: 'canonical', href='https://mydomain.com/posts' }
]
...

Sitemap.xml

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>

Secure URL With HTTPS

What impact on SEO when using HTTPS

Ranking

Traffic

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Responses (3)

Thanks bro! Nice and easy to understand.

--

Awesom bro!
Thank you so much!

--

Hey Ravi,
Cool posts on constraints!
My name is Michael and I’m a Content and Community Manager at DZone. Anyway, one of our writers contacted me about reaching out to see if you be interested in sharing these posts in our Mobile Zone. Please contact…

--