Add Google Ad Sense ads.txt file to Squarespace
Adding a Google AdSense ads.txt file to Squarespace is difficult since Squarespace doesn’t allow direct uploads to its core files. However, with a simple workaround, you can get it done. Follow these steps:
Create Google Ad Sense ads.txt file
Sign in to your AdSense account.
Click the alert Fix now to get the code. Or click Sites —> click the site with the 'Not found' ads.txt status.
Click Copy.
Paste the line into each of your ads.txt files. Your ads.txt file will look like this
google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0
Replace pub-0000000000000000
with your own publisher ID.
5. Open Notepad and paste the code. Save the file as “ads.txt”.
Upload the ads.txt file to Squarespace
1. Add the ads.txt file to your site:
Open a page and make a next text block, alternatively, click on an existing text block.
Click the link icon, click the drop-down, select ‘File’ and upload the ads.txt file.
Click the checkbox to add it to the page (this is temporary), and click ‘Copy’ to copy the link to the file.
2. Once uploaded:
Temporarily add the file link to your page.
Click “Copy” to copy the file link address.
Remove the file. Click the “Save” page.
Set up file redirection
Go to URL redirection in Settings —> Developer Tools —> URL Mappings (read instructions are here if you haven’t done this before)
Add the following URL redirect and click “Save”.
/ads.txt -> /[your-copied-link-address] 301
Verify on Google Ad Sense
Sign in to your AdSense account.
Click “Sites” and select the site that you want to check for updates.
Click “Check for updates”.
Google will update the ads.txt status on your Sites page after verifying the file.
And that’s it! By following this workaround, you’ve successfully added an ads.txt file to your Squarespace site, ensuring compliance with Google AdSense and avoiding any potential revenue issues. Now its time to earn!