Jump to content

Need to add a text-only page to our site to display a JSON file

Recommended Posts

Site URL: https://www.ops.co

Our business is in the ad tech industry.

We need to add a page to our Squarespace site which is text-only with zero branding or navigation, just a simple text-only page in which we need to display an industry-required JSON file ... the URL would be https://www.ops.co/sellers.json .

We can create a 'regular' page in Squarespace by the name /sellers.json, of course; but Squarespace tools treat that page like a part of our overall site with branding and navigation and CSS based on the overall settings in our Squarespace account.

An example from another site showing what we are trying to accomplish would be https://yieldlift.com/sellers.json ( but this example is on a site that is not hosted within Squarespace). We need to accomplish this same result in Squarespace for the equivalent https://www.ops.co/sellers.json we need to publiush under our top-level domain.

We chatted with SS help and they said it was not possible using standard SS tools to accomplish this. But they suggested that someone here in the Forum may have a suggestion for using Advanced manual coding for this page.

So that's our situation -- and our question.

Anyone have any ideas?


- OpsCo Team


We are not asking here about how to reveal or display JSON data about our site pages... as is referenced in some Squarespace forum articles.

We are asking here about how we can present JSON data about our company in a page at https://www.ops.co/sellers.json to meet some ad industry requirements that we have such a file in such a URL under our top-level domain.


Edited by OpsCo
clarifiying question
Link to comment
  • Replies 3
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Does the file need to be at the exact path ( /sellers.json ) on the site? Or could it be at /s/sellers.json?

Did SS help not mention using a Link page? And possibly a URL redirect? Not sure about the last part as I've not tested that type of redirect but it seems a first logical step to try and these are all built-in SS features.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thanks, creedon.

We are checking with the industry group that requires this file to be present about linking or redirecting vs. direct path. We don't have that answer yet.

Understand the link page options.

Looks like the URL redirect SS documentation is about redirecting non-existent URLs to existing URLs all within the same SS domain. So if that is the case, we'd still have to set up the desired page within SS tools anyway (either as the direct path or for the redirect-to page).

Edited by OpsCo
Link to comment
  • 2 weeks later...

Circling back here to update this with how we solved this:

1. We had to create a subdomain of our main domain at another hosting location (not Squarespace) to host the sellers.json file we need to publish.

2. Then, in Squarespace using URL Mapping tools, we set up a redirect path from the maindomain.com/sellers.json (hosted at Squarespace) >>> sub.maindomain.com/sellers.json (where the actual json file is hosted).

We have completed this setup using some test page names in SS and test files at the subdomain hosting location -- and it all works nicely.  Note: The actual implementation of the live /sellers.json files is not live yet -- but we have fully tested the above method of accomplishing this and it works as it should.


* You can't accomplish having the sellers.json file display in a browser by using Squarespace URL mapping / redirecting to a static sellers.json file that is also hosted at Squarespace -- because, while the basic redirection works to the file, the way Squarespace handles the request for the static file is to always download the file upon request and it will never display as viewable in the browser as a *.json file .

* Our method described above could likely also be useful for publishers in Squarespace that need to post an /ads.txt file under their domain. There are some other articles in this forum about ads.txt and even using URL mapping to redirect to a static file also at Squarespace... but as described in the previous note above about the sellers.json file... in this scenario, even the *.txt file will get downloaded to local computer when reqested and not displayed in the browser.

* The scripts in the ad tech world that crawl ads.txt and sellers.json files may be able to scan / scrape a download-only file... but to have the files actually show up as viewable in a browser, they would have to be hosted in a non-Squarespace environment under a subdomain of the same top level domain you have hosted at SS... because the top-level 'domain.com' needs to be the same as the "domain.com" used for the subdomain.


A. This WORKS for ads.txt and sellers.json purposes: Top level domain at Squarespace = domain.com, and then the ads.txt or sellers.json hosted under xxx.domain.com subdomain at another hosting location. Redirection using URL mapping tools in SS works fine.

B. This does NOT work for ads.txt and sellers.json purposes: Top level domain at Squarespace = domain.com, with ads.txt or sellers.json hosted under different.com TLD or xxx.different.com subdomain at another hosting location.  While the technical setup will work to redirect to any non-SS host... the ad tech crawlers looking for these verifying files will reject any files that are hosted at a domain or subdomain that does not match the top level domain used for the main site.

Hope this is helpful.

Edited by OpsCo
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.