Add AdSense ads.txt file to your Squarespace site - Easy and Effective method

Squarespace users might face challenges when trying to upload the Google Adsense ads.txt file to the root directory since Squarespace does not provide an official procedure for uploading Ads.txt file. This guide will show you how to add ads.txt for Adsense to behave like a successful upload to a Squarespace root directory. By following this effective method, the ads text file for my website was found instantly by Google AdSense.

If you don't upload ads.txt file to Squarespace, the AdSense dashboard displays the warning β€œEarnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue”.

add AdSense ads.txt file to your Squarespace site

add AdSense ads.txt to Squarespace

Step 1: Save AdSense Ads.txt Code

Log in to your AdSense account.

Navigate to Sites, then click on the site displaying the "Not found" ads.txt status.

Click on the β€œCopy” button to copy the Ads.txt code which includes your publisher ID.

Note: AdSense publisher ID is not confidential/secret. It can be publicly accessed. However, your AdSense customer ID is confidential, and you should not share it publicly.

Copy AdSense ads.txt file

AdSense ads.txt code

You need a plain text editor, such as Notepad (Windows) or TextEdit (Mac).

Therefore, using the search box inside the computer taskbar, search for β€œNotepad”, and open it. Paste the AdSense code in the Notepad.

Click β€œFile” then the Save option. Name the text file as you like. I named it as β€œads”.

πŸ‘‰οΈ Watch Video Tutorial Below.

Step 2: Upload the AdSense Ads.txt File to Squarespace

Open your Squarespace site. From the β€œMain Navigation”, click the plus βž• symbol and select the β€œLink” option.

From the URL options, select β€œFile”.

Upload AdSense ads.txt file to Squarespace root directory

Upload ads.txt file to Squarespace

Click the Upload button and select the saved Ads.txt file from your computer. It will be uploaded instantly.

Do not Save it. Just close the pop-up window.

Step 3: Get Actual URL Link of the Uploaded File from Squarespace Server

Using a search engine (Google, Bing), search for β€œURL tracking tool” and open a free online tool like β€œTiny Scan”.

In the given field, enter https://www.yoursite.com/s/filename.txt.

  • Replace "yoursite" with your own website domain. Like I will replace it with β€œdozro”.

  • Replace "filename" with the name of your uploaded text file. As I had named the ads.txt file as β€œads”, therefore I will replace the "filename" with β€œads'β€œ.

So, in my case the final URL will become https://www.dozro.com/s/ads.txt as shown in video demo.

add ads.txt file to Squarespace - copy Squarespace root directory real URL

After selecting the β€œScan” button, it will start scanning the URL. After scan, it will provide you the real URL of the uploaded file, which will be actually served from the Squarespace servers. Just copy it.

https://static1.squarespace.com/static/6219238e0278bd045f89ac26/t/66ccb46e85a96a5d4f521061/1724691566374/ads.txt

In my case, the tool provided me the above URL. Of course, your URL will be different.

Step 4: Prepare Redirection Text for URL Mapping

Modify the below text with your own.

/filename.txt -> [actual-squarespace-server-URL] 301

Replace "filename" with the name of your uploaded text file. As I had named the ads.txt file as β€œads”, therefore I will replace the "filename" with β€œads'β€œ.

Replace "[actual-squarespace-server-URL]" with the actual URL of the uploaded file, you copied from the tracking tool.

So, in my case, the final prepared URL redirection text looks like this.

/ads.txt -> https://static1.squarespace.com/static/6219238e0278bd045f89ac26/t/66ccb46e85a96a5d4f521061/1724691566374/ads.txt 301

Just copy the text and paste in Squarespace URL mapping.

Step 5: Implement a Redirect in Squarespace URL Mappings

Open your Squarespace website and navigate to β€œSettings”.

Select the option of Developer Tools.

Squarespace URL mapping for AdSense ads.txt file

Open URL Mappings.

Press β€œEnter” to add a new line.

Paste the copied text in URL Mappings. In my case, I pasted the following text.

/ads.txt -> https://static1.squarespace.com/static/6219238e0278bd045f89ac26/t/66ccb46e85a96a5d4f521061/1724691566374/ads.txt 301

Click the Save button.

Step 6: Request AdSense to Update the Ads.txt File Fast

Access AdSense dashboard and open the same website.

Click the β€œCheck for Updates” option. Google AdSense will attempt to find ads.txt file on your website.

Prompt Google AdSense to quickly find ads.txt file on your website

Prompt AdSense to quickly find ads.txt file on website

Success. Ads.txt found.

Google AdSense will promptly display this notice.

β€œGood news, we found your publisher ID in the Ads.txt file”.

Voila!

More Resources

Make sure to follow Dozro's social media pages including our YouTube channel and Facebook page.

FAQs

Can I monetize my Squarespace website through Google Ads?

According to Squarespace, you have the option to showcase ads on your website through third-party platforms such as Google AdSense. Additionally, the Dozro website utilizes Squarespace CMS and has effectively monetized its content with Google AdSense.

Is adding ads.txt file on website mandatory?

As per Google AdSense, although the utilization of ads.txt is optional, it is strongly advised. This practice assists buyers in recognizing counterfeit inventory and enables you to attract additional advertiser investments that could have otherwise been directed towards such illegitimate sources.

Where can I find the AdSense Ads.txt code to copy from?

Log in to your AdSense account, go to Sites, and select the site with the "Not found" ads.txt status. Press the β€œCopy” button to save the Ads.txt code containing your unique publisher ID.

Irfan Hayat

As the Founder and CEO of DOZRO and various other ventures, I bring a wealth of diverse life experiences to the forefront. At heart, I am a passionate tech enthusiast. Feel free to explore our range of Pro Services, such as website and graphics design, SEO, and video editing, with confidence.

https://www.dozro.com/irfan-hayat
Previous
Previous

4 Choices To Enable Website Visitors To Share Your Squarespace Pages on Social Media

Next
Next

Activate Gmail for Google Workspace on Squarespace by entering MX, SPF, and DKIM Records in Squarespace DNS settings