If you find this helpful, please help support my site and my work by either donating with the button below or by ordering a print of your favorite photo from my shop.
“Earlier this week, I woke to an email from Google banning my AdSense account. Their reasoning? A generic “invalid traffic” statement with no details whatsoever explaining why or how. I tried to appeal and was immediately denied with no explanation.
As a result, I cannot continue to support this workaround in getting AdSense to function with Squarespace websites. If anything changes, I will be unable to test, troubleshoot, or continue to address this in any way. I have no way to use AdSense to see if anything I do will make any difference.
I am disheartened by this and hope that this will continue to work and help others for a long time to come. I hope someone else can take the reigns and addresses any further changes in either platform. And, as you all probably know, without AdSense, I am no longer generating ad revenue from my blog to help keep my site afloat. I will look into additional platforms for ads in the coming weeks, but I am unsure if I will meet the requirements to use other platforms or if Squarespace will support other platforms.
Finally, I want to add that I have no reason to believe that using a URL Redirect as described in this guide is in any way related to my account ban. Please don’t be discouraged from using this to get ads to work on your website. I have no idea what has caused or been identified as invalid traffic, but there’s no reason to suggest it’s related to these steps.
Thank you all for the donations and kind comments. I will continue to help address issues as best as I can, but I will be unable to address new problems that arise. ”
“I hadn’t checked my AdSense in a little while, but this morning the error re-appeared. I changed my URL Redirect on Squarespace from a 301 to a 302, then saved my settings. I then double checked my Ads.txt file with the URL checker tool in this guide (https://www.redirect-checker.org/index.php). It explained some errors using 301 and 302 simultaneously. I found this a little odd, but I’ll explain in the next paragraph. I then changed it back to 301, checked with the URL redirect checker tool, and the errors were gone. I then refreshed Google AdSense and the error had disappeared again too. This all occurred over a few minutes time, so no need to wait 24 hours to be crawled again.
To explain what I found odd: When I originally wrote this guide to include the URL Redirect tool I linked to, I noticed Squarespace had been using a 302 URL redirect on uploaded files. The trouble is that when we add a 301 redirect to the file, it is in fact confusing to search engines because Squarespace is designating them with 302 (temporary) and we’re designating them as 301 (permanent). The reason I have written in comments and below in this page about possibly using 302 instead is to avoid this confusion mixing 301 and 302. The problem is that we know our Ads.txt isn’t going anywhere, so it should be permanent.
Seeing that it is now 301 from Squarespace means that they made a change at some point between me writing this guide and now. I’m not sure when, but it might have something to do with Google giving some of us the error again. The change may not have happened for everyone all at once either and still could be happening to customers now. If Google sees the URL redirect as we set it up, then they detect a change to how that URL is addressed or accessed, it can confuse or break their connection to it. So by Squarespace changing from 302 to 301, it could have broken that connection to Google.
In theory, this change is better for all of us. 301 is permanent, which tells search engines not to worry, the file isn’t going anywhere. In theory, it should mean no more issues. BUT, not long ago, I had the error again and I noticed today the error is back. I’m not sure if what I did in my previous written update actually fixed anything, though it appeared to after I broke the URL redirect and then corrected it. I’m not sure how long it lasted. Or I’m not sure if simply changing to 302 and then back to 301 fixed anything either. Time will tell, but I will continue to look into this until Squarespace offers a proper solution to address this, or until I change platforms due to stupid issues like this.
If anyone wants more details or simpler explanation, feel free to contact me or comment. It’s kind of a complicated topic and I tried to write as little about it to keep this from being too long. ”
“After breaking my URL Mappings within Squarespace for 24 hours, then correcting it again, the error has gone away again. This isn’t the first time this has happened, but it’s not common and worth noting. This happens about every few months, if at all. ”
“I just checked my Google AdSense account this morning and the error appeared again. I do not know why. I have broken my URL Mappings temporarily and will fix them tomorrow to determine if it fixes the problem. If not, it means either Google or Squarespace has changed something that requires me to change my guide. The other possibility is that I must change the 301 designation in my URL Mappings to 302 instead, though I don’t know how this might impact things. ”
Google AdSense requires you to add a text file to the root directory of your website to give you credit for the ads on your site. The problem is, SquareSpace doesn’t offer any tools to let you do this. You upload a file to SquareSpace and it goes wherever they dictate. You can’t even move the file location. The steps below will use some web tricks to make Google think the required file is where it needs to be.
There are three major steps in this process and I will break this guide into sections to address them. First, you will upload the ads.txt file. Then you will find the real web address of the uploaded file. Finally, you will setup a URL Redirect to the uploaded file.
If you followed my previous guide, you will be familiar with uploading and setting up the URL Redirect. The difference is that I discovered SquareSpace uses a temporary URL redirect on the uploaded file already. This confuses Google AdSense and leads to the error of your earnings being at risk coming back, despite using the URL Redirect method. So there is an added step, which this new guide will cover.
Upload ads.txt
This assumes you already downloaded or created the ads.txt file from Google AdSense.
Create your ads.txt file if necessary (see Google Adsense for more information)
Upload the ads.txt file by following Squarespace’s upload steps here
Add the ads.txt file to a page (this will only be temporary)
View the page with the ads.txt file
Right click the file and choose “copy link address” (the exact words may be different depending on the browser you are using)
Find the web address of the uploaded file
In my previous guide (linked earlier in this page), the web address for the uploaded file was www.your_site.com/s/ads.txt. However, SquareSpace uses a temporary URL Redirect to come to this address. The real location is a much longer string of text. I only discovered this by using a web tool to test and track what happens when I tried to use the /s/ads.txt web address for my own URL Redirect. I hoped I would see something that would explain why the error with Google kept coming back. That’s when I discovered the additional URL Redirect SquareSpace uses as well as the true address to the file uploaded. Follow the steps below:
Visit http://www.redirect-checker.org/index.php in a new browser tab or windows (if you prefer a different redirect checking tool, you may use it instead of this one)
Paste the link you copied from Step 5 above in the text field of the Redirect Checker
Click Analyze
Take note of the results once you Analyze the address:
Example:
http://graesen.com/s/ads.txt
301 Moved Permanently
https://www.graesen.com/s/ads.txt
302 Found
https://static1.squarespace.com/static/5d0a92915e83160001822e6d/t/5d0d26c6a0dd580001485b51/1561142982659/ads.txt
200 OKCopy the long URL below “302 Found” and above “200 OK”
Example: https://static1.squarespace.com/static/5d0a92915e83160001822e6d/t/5d0d26c6a0dd580001485b51/1561142982659/ads.txt
NOTE: The exact web address above will be different for every user. Using this web address instead of your own will result in ME getting credit for YOUR ads. DO NOT USE the above web address!
Setting up URL Redirect
Next, you will use the web address from Step 5 above in a URL Redirect.
If you find this helpful, please help support my site and my work by either donating with the button below or by ordering a print of your favorite photo from my shop.
Setup a URL redirect following Squarespace’s steps here
The code for the URL redirect should resemble the following:
/ads.txt -> [the copied link address] 301
or
/ads.txt -> https://static1.squarespace.com/static/5d0a92915e83160001822e6d/t/5d0d26c6a0dd580001485b51/1561142982659/ads.txt 301
Type “[yoursite.com]/ads.txt” into the address bar of your browser to verify it works. You should see the ads.txt file start to download if you did this correctly. If it does not download, you missed a step or mistyped the URL redirect code.
Delete the text/link to the ads.txt file from Step 3 from the Uploading section of this guide above (DO NOT delete the file, only the text to the file)
NOTE: It make take 24 hours before the error goes away on Google AdSense. It took several days before I noticed the error resolved.