N
Nuxt8mo ago
dido_dev

SEO Configuration Issue with Ignoring Localized

Hi, I need to exclude a few pages from some locales and prevent hreflang tags from being created for them. I'm struggling to figure out how to do this, but I found this guide on Ignoring Localized Routes: https://i18n.nuxtjs.org/docs/guide/ignoring-localized-routes. I have three locales ['it', 'en', 'en-us'] and I'm trying to enable only 'it' and 'en' for the page with the following setup:
<script setup>
defineI18nRoute({
locales: ['it', 'en']
})
</script>
<script setup>
defineI18nRoute({
locales: ['it', 'en']
})
</script>
This should remove ['en-us']. Here is my head configuration:
const head = useLocaleHead({
addDirAttribute: true,
identifierAttribute: 'id',
addSeoAttributes: true,
})
const head = useLocaleHead({
addDirAttribute: true,
identifierAttribute: 'id',
addSeoAttributes: true,
})
I expected that this would remove the en-us hreflang and SEO references, but it hasn’t. So, how can I prevent rendering i18n SEO attributes for certain locales to avoid SEO issues from crawlers? Any suggestions would be appreciated! Thanks and kind regards, Davide
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server