where to add google-site-verification file #14806
-
Hello friends. I need to add the html file made available by google for property recognition on my SSR website, what are the ways to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 7 replies
-
You can add it in the |
Beta Was this translation helpful? Give feedback.
-
You can do the verification in a lot of ways I'm using the meta tag approach: Read more here: https://support.google.com/webmasters/answer/9008080?hl=en |
Beta Was this translation helpful? Give feedback.
-
Thanks to everyone for the answers, the solution with the tag worked well, but I didn't get to test it in the public folder |
Beta Was this translation helpful? Give feedback.
-
@henriquematiasb @carloscuesta @rafaelalmeidatk I am using the nextjs 13.4 metatag the header is created and do contain all of the attributes and tags but once I try to do the Google verification from the console search it does not work, I've even try using the next/head component and the google html file still failing to verify 😔😓 any idea? export const metadata: Metadata = { |
Beta Was this translation helpful? Give feedback.
-
in the /app/layout.tsx
Code like above will be okay. |
Beta Was this translation helpful? Give feedback.
-
Just jumping in here to say that the /public/ folder method worked a treat for me. |
Beta Was this translation helpful? Give feedback.
-
Yes can easily verify using the meta tag approach by implementing in in the page.js or tsx file (not the layout file) like this below>export const metadata = { |
Beta Was this translation helpful? Give feedback.
-
FIXED. I was also putting google-site-verification after the " = " sign, for example, when you add the site verificaiton (with autofill from cursor or copilot), it autofills: export const metadata: Metadata = {
title: SITE_CONFIG.title,
description: SITE_CONFIG.description,
verification: {
// THE PROBLEM IS HERE !!
google: "google-site-verification=1234567890",
},
} Naturally you would add "google-site-verification={your code}", but that is the problem, you must replace the ENTIRE text, for example: export const metadata: Metadata = {
title: SITE_CONFIG.title ,
description: SITE_CONFIG.description,
verification: {
google: "o28TGr-Eb2O0IqA0xTHvwSSqOhzLrafIFGQO080bAAA",
},
} AND make sure you have clicked meta tag before clicking verify. |
Beta Was this translation helpful? Give feedback.
You can do the verification in a lot of ways I'm using the meta tag approach:
Read more here: https://support.google.com/webmasters/answer/9008080?hl=en