Jump to content

How to upload a text file to the root of a Squarespace domain - Google Ads

Recommended Posts

Looking to find a workaround on how to upload a text file to the root of a Squarespace domain, to regain access to a Google Ads account, which won't be granted until this issue is resolved.

Things I've tried already:

  1. Adding the txt file onto it's ownpage via the Squarespace pageuploader - but the url looks likethis:(www.example.com/s/google-ads.txt) which they did not accept.
  2. An external developer tried a similar workaround by remapping thelink(www.example.com/s/google-ads.txt)to redirect to the url they wouldaccept(www.example.com/google-ads.txt),but they also didn't accept this.

Here's the Google Ads support email so you can understand what they're asking for and what they don't want.

  • "We have received your Email with a link of the Text file. On checkingthe same Link we found that, the textfile has been created however, pleasebe advised that it has not beenuploaded correctly in the root of theDomain. On clicking the Link sent byyou, we get an option to download thetext file however it should redirectus to the Text file uploaded in theroot of the Website. We are sharingthe steps, please refer below for thesame: Create a .txt file and save itas: Google-Ads.txt Include thefollowing string of text in this textfile: “GooGXXXXXXXXX". Please addinfo@exampleurl.com to Google Adsaccount XXXXXXXX with Admin access -Date 27--2-2019.” Upload this textfile to the root of each of thedomains from which you're requestingaccess. You’ll append"Google-Ads.txt" to the end of yourURL. For example, if your site URL ishttp://www.example.com, the uploadedfile will look like this:http://www.example.com/Google-Ads.txtOnce you have an email domain thatmatches your company domain or haveappended the “Google-Ads.txt” file toyour website (if you do not have anemail domain that matches yourcompany domain), please reply back tothis email with the informationrequested above."

After getting in touch with Squarespace directly to see what we could do, they let me know that it is not possible to upload directly to the root domain using the Squarespace built-in platform.

Does anyone have a workaround for this? Really need to regain access to Google Ads.

Edited by bxsil
Initial Revision
Link to comment
  • 4 months later...
  • 1 month later...

I'm trying to find a workaround to enable me to add an ads.txt file to the root of a domain in Squarespace.  I've searched high and low, but don't seem to be able to find a solution that will work properly.  I would appreciate advice from anyone who has found a solution.  From what I've read so far, it seems as if it isn't worth running Adsense if you are not able to place the required ads.txt file in the root of your domain.  Without this, your revenue would be significantly reduced as many advertisers won't serve ads on sites without it in place.

Link to comment

@JONNO @Tenniscraft @softsoldier 

I think I've found a solution! You have to go through several steps, including URL remapping. 

Here's what I did:

1. Download the ads.txt file from Google AdSense.

2. On Squarespace, go to your Pages, and create a blank page under the "Not Linked" section. 

3. On that page, create a text block and write anything you like. I wrote "test". 

4. Highlight the text and click on the hyperlink icon. Once the small window pops up, click on the settings icon. 

5. Go to the "File" section and upload the ads.txt file. Once uploaded, click on it to select it (a tick mark will appear next to it). Click apply then save the page. 

8. Return to your page's dashboard and go to Settings --> Advanced --> URL Mappings.

9. In the box, type "/ads.txt -> /s/ads.txt 301". Save. 

Et voila! You should be good to go. You can even delete the page you've created earlier - the file will still be saved on Squarespace. 

 

Link to comment
On 2/6/2020 at 6:03 PM, Marinaoftheworld said:

@JONNO @Tenniscraft @softsoldier 

I think I've found a solution! You have to go through several steps, including URL remapping. 

Here's what I did:

1. Download the ads.txt file from Google AdSense.

2. On Squarespace, go to your Pages, and create a blank page under the "Not Linked" section. 

3. On that page, create a text block and write anything you like. I wrote "test". 

4. Highlight the text and click on the hyperlink icon. Once the small window pops up, click on the settings icon. 

5. Go to the "File" section and upload the ads.txt file. Once uploaded, click on it to select it (a tick mark will appear next to it). Click apply then save the page. 

8. Return to your page's dashboard and go to Settings --> Advanced --> URL Mappings.

9. In the box, type "/ads.txt -> /s/ads.txt 301". Save. 

Et voila! You should be good to go. You can even delete the page you've created earlier - the file will still be saved on Squarespace. 

 

This method worked for me last year, but no longer seems to be working. Even when I had it working, it would intermittently stop working. 

I'm trying now with the full URL redirect, e.g. "/ads.txt -> https://domain.squarespace.com/s/ads.txt 301" If this still doesn't work, I'm going to have to find an alternative to Adsense.

Link to comment

@Tenniscraft @AlexFa @Marinaoftheworld 

Thanks to everyone who replied to my question and for your suggestions.  I contacted Squarespace support and requested assistance, but unfortunately the person who replied to me could only say that they will refer the matter to development, but couldn't guarantee that it will be resolved any time soon.  I guess he didn't have the authority to promise anything, but there's always hope that the message got through to the right people.  I can't see why it can't be implemented as other platforms have done so, and it's a major requirement for anyone looking for a simple way to monetize their blog so really in Squarespace's best interest to solve.

Below is the reply I received:

Happy to help you with this!
We don't currently offer that feature, but I'd be happy to suggest it to our development team. While we can't guarantee implementation of every suggestion, customer feedback is an important part of how we continue to improve our platform, so we appreciate your input.
You can keep up-to-date on developments at Squarespace by following our blog here:
http://blog.squarespace.com
In addition to the major product features we already post, we’ll also be adding product update summaries that roll up smaller releases, updates, and fixes.
If you need any further assistance, or have a question or comment, we'll be happy to help you!

Juan U.

http://support.squarespace.com

I hope others reading this will follow up with support as well so that they can see that more clients are requesting this feature.

@PDChappelle has your full URL redirect worked since you tried it, or have you moved on to an alternative?  

 

Link to comment
  • 2 weeks later...
On 2/27/2020 at 1:45 PM, JONNO said:

@Tenniscraft @AlexFa @Marinaoftheworld 

Thanks to everyone who replied to my question and for your suggestions.  I contacted Squarespace support and requested assistance, but unfortunately the person who replied to me could only say that they will refer the matter to development, but couldn't guarantee that it will be resolved any time soon.  I guess he didn't have the authority to promise anything, but there's always hope that the message got through to the right people.  I can't see why it can't be implemented as other platforms have done so, and it's a major requirement for anyone looking for a simple way to monetize their blog so really in Squarespace's best interest to solve.

Below is the reply I received:

Happy to help you with this!
We don't currently offer that feature, but I'd be happy to suggest it to our development team. While we can't guarantee implementation of every suggestion, customer feedback is an important part of how we continue to improve our platform, so we appreciate your input.
You can keep up-to-date on developments at Squarespace by following our blog here:
http://blog.squarespace.com
In addition to the major product features we already post, we’ll also be adding product update summaries that roll up smaller releases, updates, and fixes.
If you need any further assistance, or have a question or comment, we'll be happy to help you!

Juan U.

http://support.squarespace.com

I hope others reading this will follow up with support as well so that they can see that more clients are requesting this feature.

@PDChappelle has your full URL redirect worked since you tried it, or have you moved on to an alternative?  

Nope. I've had to ditch Adsense for Skimlinks. I didn't want to do it, but Squarespace leaves me with no choice. 

There's a guy who runs a Squarespace site, who had been helping us immensely with this issue. His instructions were useful, but something with the SQSP platform kept screwing it up. He is now leaving Squarespace for Wix. 

 

Link to comment

For anyone who has been trying to unsuccessfully install Google Adsense on their Squarespace site, here are the instructions

This is a permanent solution, similar to the other method, but with changes.

Please give it anywhere from 24 hours to a week to take effect. https://www.graesen.com/blog/resolve-google-adsense-your-earnings-may-be-at-risk-error-for-squarespace 

Link to comment
  • 2 weeks later...
On 3/16/2020 at 2:20 PM, PDChappelle said:

For anyone who has been trying to unsuccessfully install Google Adsense on their Squarespace site, here are the instructions

This is a permanent solution, similar to the other method, but with changes.

Please give it anywhere from 24 hours to a week to take effect. https://www.graesen.com/blog/resolve-google-adsense-your-earnings-may-be-at-risk-error-for-squarespace 

I officially joined this forum just to tell you THANK YOU! hahaha 

Link to comment
  • 3 weeks later...
  • 1 month later...

I found this thread very helpful!

I have a question to piggyback off of this. In the instructions, it says that we can delete the physical text after we are done with the URL Mapping. What would you do in a situation where you needed to update the ads.txt file again (maybe due to adding more partners)? Would you just have to repeat the entire process again?

 

Link to comment
  • 4 months later...
On 3/16/2020 at 7:20 PM, PDChappelle said:

For anyone who has been trying to unsuccessfully install Google Adsense on their Squarespace site, here are the instructions

This is a permanent solution, similar to the other method, but with changes.

Please give it anywhere from 24 hours to a week to take effect. https://www.graesen.com/blog/resolve-google-adsense-your-earnings-may-be-at-risk-error-for-squarespace 

Hi guys, need a bit of assistance, in these instructions (from the link) it states to upload the file into link editor, but what type of link is it? These are the options according to the squarespace help page. 

Thanks!

Link to comment
  • 4 weeks later...
On 10/3/2020 at 9:58 PM, cizz said:

Hi guys, need a bit of assistance, in these instructions (from the link) it states to upload the file into link editor, but what type of link is it? These are the options according to the squarespace help page. 

Thanks!

Text link. The instructions tell you that. Sorry for the late response. 

Link to comment
  • 1 month later...
On 3/16/2020 at 9:20 AM, PDChappelle said:

For anyone who has been trying to unsuccessfully install Google Adsense on their Squarespace site, here are the instructions

This is a permanent solution, similar to the other method, but with changes.

Please give it anywhere from 24 hours to a week to take effect. https://www.graesen.com/blog/resolve-google-adsense-your-earnings-may-be-at-risk-error-for-squarespace 

I've tried Graesen's approach several times but have run into two issues. The first is that when I visit the redirect checker, it gives me this error: "You use a 302 redirect. This means that the content is temporarily not reachable and will come back soon. Using a 302 redirect is a bad idea because the search engine bot might not follow it or handle it as temporary. It's also a bad idea for SEO because no 'link juice' will be transferred to the linked page."*

The second error I get is when I go to input the URL mapping. Squarespace tells me, "An unexpected error happened when saving your data. We don't allow unlimited rules. If you have more than 5000 rules, that is most likely the cause."*

Has anyone else run into the same issues? As much as I'd like to run AdSense as a form of passive income, I'm not sure it's worth the headache.

*I edited the language for grammar but the error was littered with grammar mistakes which makes me question the legitimacy of the error. See screenshots.

Screen Shot 2020-12-17 at 7.49.39 PM.png

Screen Shot 2020-12-17 at 7.50.14 PM.png

Link to comment
On 12/18/2020 at 12:50 AM, jessikalyngarcia said:

I've tried Graesen's approach several times but have run into two issues. The first is that when I visit the redirect checker, it gives me this error: "You use a 302 redirect. This means that the content is temporarily not reachable and will come back soon. Using a 302 redirect is a bad idea because the search engine bot might not follow it or handle it as temporary. It's also a bad idea for SEO because no 'link juice' will be transferred to the linked page."*

The second error I get is when I go to input the URL mapping. Squarespace tells me, "An unexpected error happened when saving your data. We don't allow unlimited rules. If you have more than 5000 rules, that is most likely the cause."*

Has anyone else run into the same issues? As much as I'd like to run AdSense as a form of passive income, I'm not sure it's worth the headache.

*I edited the language for grammar but the error was littered with grammar mistakes which makes me question the legitimacy of the error. See screenshots.

Screen Shot 2020-12-17 at 7.49.39 PM.png

Screen Shot 2020-12-17 at 7.50.14 PM.png

This happened to me when I first tried it. In my case, it there was a space in the url that I hadn't noticed. Try looking to make sure you have no spaces in yours. 

Link to comment
  • 8 months later...

Site URL: https://olamedia.mx/ads.txt

Following this post, I have successfully added an ads.txt file . Now I would like to be opened in the browser and not automatically downloaded. I know that Squarespace automatically downloads files according to its extension, but I was just wondering if it's possible to prevent it?

I also know that I could redirect to an external site and point it to the txt file but what would be my last resort.  

Any thoughts?

Thanks

Link to comment
  • 10 months later...

I am trying to connect a site to AdSense so to get Ads on the homepage on a site. I've been watching a couple Squarespace videos on how to do small customizations on my website via the Custom CSS section and I type in the code exactly and it constantly gives me the Syntax Error on Line 1.

Not sure what I'm doing wrong?

Here's the code I was trying out...

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1715047857096502"
     crossorigin="anonymous"></script>

Screen Shot 2022-07-06 at 15.13.16.png

Link to comment
1 hour ago, PSpradley1 said:

I type in the code exactly and it constantly gives me the Syntax Error on Line 1

The code you are trying to add is HTML, not CSS. It cannot be added to the Custom CSS panel, and this is why you are seeing the error.

You can add HTML by adding it to Settings > Advanced > Code Injection.

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment
  • 1 year later...

The redirect works and the landing page is "text/plain" , but the Content Type of the Squarespace extension is wrong and cannot be accessed by ad network crawlers, because they first access this before redirect, and it gives "text/html" error? I have contacted multiple Squarespace customer support people, but none of them know what to do. Last one suggested I try forums? 

 

Any guidance would be much appreciated, I am stuck on this for a week now, the fact Squarespace does not have an option to host ads.txt which is an industry standard is beyond ridiculous

 

Edit: tried creating a separate page and set its Content Type to text/plain via code injection, but still it returns as "text/html", and even if it worked the URL SLUG does not let me put a "." full stop which is crucial for the /app-ads.txt extension. I used this code for injection in pages settings  <meta http-equiv="Content-Type" content="text/plain; charset=utf-8"> 

Below are to screens with the problem I am having:

example.png

header type.png

Edited by Brother77
Additional image
Link to comment

But how do people fix their ads.txt ? I have a third party website that hosts ads.txt as "text/plain" via blogger.com, URL MAP in SS, but now the crawler cannot read it because before the redirect the Content Type on SS is "text/html" !

There is no way to change the "text/html" of the page to "text/plain"  ? 

Edited by Brother77
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Ă—
Ă—
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.