Reputation: 922
I am using Nextjs
+ next-intl
. I now need google site verification. I chose to add meta, but it was unsuccessful because mydomain.com
will automatically jump to /en/
or /zh/
route depending on the language because app/page.tsx
has below code:
export default function RootPage() {
redirect('/en');
}
I tried adding below code to app/layout.tsx
export const metadata: Metadata = {
verification: {
google: '...',
},
};
And then clicked the Google search console verification button, but it was unsuccessful. I tried adding meta to app/[locale]/layout.tsx
and it succeeded, but it can only be verified when the URL is the Language. , but I want to verify the URL without language routing, am I wrong? I don’t need this? I just need to add meta to the two locales respectively?
Upvotes: 0
Views: 175