SEO Tips

Ensure that you fill these configs in the nuxt.config.js file with the correct values:

export default defineNuxtConfig({
  site: {
    name: process.env.NUXT_PUBLIC_BASE_URL,
  },
  sitemap: {
    hostname: process.env.NUXT_PUBLIC_BASE_URL,
  },
})

Also, set SEO meta tags in the /pages/*.vue directory using the useMetaTags composable. For example:

useMetaTags({
  pagePath: '/', // path of the page
  titleKey: 'seo.title.home', // key from i18n
  descriptionKey: 'seo.description.home', // key from i18n
  imageUrl: 'https://pictures.helios.pyango.ch/?image=/media-files/pictures/pyango-software-agency-meta-home.png&width=1200&height=630&to=webp',
  type: 'website',
  twitterCardType: 'summary_large_image',
  twitterSite: '@pyangogmbh'
});

1. Sitemap

  • ✅ Sitemap must exist and be submitted to Google Search Console.

  • ✅ All URLs in the sitemap must match canonical URLs exactly.

  • ✅ For SSL sites, all URLs should be HTTPS.

  • ✅ Pay attention to trailing slashes (/), as they are related to your i18n configuration in the nuxt.config file.

  • ✅ Ensure sitemap is updated automatically with new pages.

Sitemap Configuration in nuxt.config.js

export default defineNuxtConfig({
  sitemap: {
    hostname: process.env.NUXT_PUBLIC_BASE_URL || 'https://xxx.ch',
  },
})

4. HTML lang Attribute

  • ✅ Set the correct <html lang=""> for all pages. - Example: <html lang="de-CH"> for Swiss German.

  • ✅ Required for multilingual sites to signal page language to search engines. - For a single-language site: It’s not strictly required for SEO to work, but it’s still a good practice for accessibility and proper HTML standards.

5. Open Graph (OG) & Twitter Cards

  • ✅ OG tags and Twitter Cards must be present on all pages.

  • ✅ Each page should include: - og:title - og:description - og:image - twitter:card

  • ✅ Images for OG/Twitter cards should be optimized and correctly sized.

6. Image Optimization

  • ✅ Images should be less than 1MB.

  • ✅ Use compressed formats (WebP, optimized JPEG/PNG).

  • ✅ Include descriptive alt attributes for all images.

  • ✅ Lazy-load images where possible to improve page speed.

7. Page Titles & Meta Descriptions

  • Titles: 50–70 characters, unique per page, include primary keywords.

  • Meta descriptions: 150–160 characters, unique, compelling, include secondary keywords.

  • ✅ Avoid duplicate titles/descriptions across the site.

8. URL Structure

  • ✅ URLs should be short, descriptive, and keyword-friendly.

  • ✅ Use hyphens (-) instead of underscores.

  • ✅ Avoid unnecessary query parameters for main content pages.

9. Internal Linking

  • ✅ Every page should have internal links pointing to relevant pages.

  • ✅ Anchor text should be descriptive and keyword-rich.

  • ✅ Avoid orphan pages (pages with no internal links).

10. Security & HTTPS

  • ✅ Site must be HTTPS.

  • ✅ No mixed content (HTTP assets on HTTPS pages).

  • ✅ SSL certificate must be valid and not expired.

11. Robots.txt & Indexing

  • Robots.txt exists and correctly allows/disallows pages.

  • ✅ Pages to index should not have ``noindex`` tags.