Jump to content

OpsCo

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Like
    OpsCo got a reaction from creedon in Need to add a text-only page to our site to display a JSON file   
    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.

    RELATED NOTES:
    * 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.
    EXAMPLES:
    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.
×
×
  • 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.