To set up an AdSense ads.txt file on Squarespace, you'll need to download the file from Google AdSense, create a blank page on your Squarespace site, upload the ads.txt file to that page, and then use URL mappings to redirect the ads.txt file to the root of your domain.
Here's a more detailed breakdown:
- Download the ads.txt file from AdSense:
-
Log into your AdSense account.
-
Navigate to the "Sites" section and locate your Squarespace website.
-
Download the ads.txt file associated with your site.
- Create a blank page on Squarespace:
-
Go to "Pages" in your Squarespace dashboard.
-
Create a new page under the "Not Linked" section.
-
You can leave this page blank, as it will only be used for the file upload.
- Upload the ads.txt file:
-
On the blank page, add a text block and write any text you want (e.g., "ads.txt").
-
Highlight the text and click the hyperlink icon.
-
Click the settings icon (gear icon).
-
Navigate to the "File" section.
-
Upload the ads.txt file you downloaded from AdSense.
-
Select the uploaded ads.txt file and click "Apply".
-
Save the page.
4. Use URL mappings:
Go to your page's dashboard, Navigate to "Settings" > "Advanced" > "URL Mappings", Add the following URL mapping: /ads.txt -> /s/ads.txt 301, and Click "Save".
5. Test the ads.txt file:
-
You can access the file at https://your-domain.com/ads.txt.
-
Google's tools can also be used to check the file.
Important Notes:
-
Ensure your ads.txt file is formatted correctly as specified by the IAB Tech Lab.
-
You can delete the blank page you created earlier, as the file will still be saved on Squarespace.
-
If you encounter any issues, consider contacting Squarespace Support or Google AdSense support for assistance.