How to Submit Your Next.js website to Google Search Console and Adsense For Site Ownership Verification

Ifeanyi Okoro

ByIfeanyi Okoro

Blog Image

So you have completed building your Next.js website and even secured a domain for it. Now, you are ready to index your website on Google Search Console to share it with the world. If you find yourself in this scenario, you're in the right place. In this post, I'll show you how I effortlessly verified my Next.js website on Google Search Console and completed AdSense site verification. Let go!


Add New Property 


⦁ To add a new property, you have to follow these steps:

⦁ Log in to your Google Search Console account.

⦁ Once you have logged in, navigate to the Property dropdown menu.

⦁ Click on Add Property.


You will be presented with two options: one is 'Domain,' and the other is 'URL prefix.' It's optional; you can choose the domain and follow the instructions. However, I went with the URL prefix. Enter the URL of your website in the provided field.



Select How You Want to Submit Your Next.js website to google search console


Google provides various verification methods to confirm site ownership, offering several options that may suit your hosting situation or the technology you're using with your blog:


⦁ HTML file upload

⦁ HTML tag

⦁ Google Analytics tracking code

⦁ Google Tag Manager

⦁ Domain name provider


In our case i will simply choose the recommended one which is HTML file upload.




After downloading the HTML file, you can simply drag and drop it into your Next.js public folder. The Next.js public folder serves as a directory for storing assets and files that you want to be publicly accessible on your website after deploying it. 


Adsense Verification For Next.js Website.


Verifying your Next.js website with AdSense follows a similar process to this verification method. Once you've obtained the ads.txt file from AdSense, you can easily integrate it into your website by uploading it to the Next.js public folder.


The public folder in Next.js works differently from other folders. Basically, the next.js public folder can be used to store other files such as robots.txt, images, svgs, favicon.ico, Google Site Verification, and other static files such as .html. But make sure to not have a static file that has the same name as a file in the pages/ or app/ directory, as this will result in an error. 


Want More?


https://nextjs.org/docs/pages/building-your-application/optimizing/static-assets


Discussion (0)