Squarespace URL Queries

What are URL queries?

https://your-site.squarespace.com/?tag=[tagName]

URL queries are the portion of a URL that follows a question mark [?]. They can also be called URL parameters, query strings or URL variables. When added to a Squarespace URL, they pass information to Squarespace to request additional information. Many of these queries are undocumented, so here’s our guide to them.

In the examples that follow, we’ve used your-site.squarespace.com as the site’s built-in domain name. As this site doesn’t exist, you’ll want to replace this with your site’s built-in domain name.

In addition to URL queries, I’ve included some β€˜paths’ - the part of the URL that follows the domain name. For example /config.

Filter by tag

You can filter a product, gallery or blog page to show only the items that have been tagged with a specific tag. For example, if your store page has the URL /store and you only want to show products tagged with β€˜blue’, you can use this URL query:

https://your-site.squarespace.com/store/?tag=blue

Please note that URL queries are case sensitive, so if products are tagged β€˜blue’ this will work, but if they are tagged β€˜Blue’ it won’t return any results.

Filter by category

You can filter a product, gallery or blog page to show only the items that have been categorised with a specific category. This works in exactly the same way as tagging above, except the query is category instead of tag. For example, if your store page has the URL /shop and you only want to show products categorised as β€˜Tops’, you can use this URL query:

https://your-site.squarespace.com/shop/?category=Tops

Viewing your site without logging on

When testing your website, it’s a good idea to view it when not logged in. This is because when you are logged on the website preview is not entirely accurate. It runs in an iFrame with some features like Ajax Page Loading (v7.0) and Code Block script disabled. You can usually do this in a private/incognito browser window, but if you are automatically logged in (your URL includes /config/) you can use the noredirect query to prevent the site from being redirected to the login. To do this, type your domain name into the browser and add ?noredirect to the URL, like this:

https://your-site.squarespace.com/?noredirect


Automatically enter the site-wide password

You can hide your site behind a password to prevent it from being publicly accessible. If you need to share your password-protected site with clients and want to make it easier for them to open the site without typing the password, you can include the ?password URL query. For example, if the site-wide password is β€˜demo’ and your built-in domain is https://your-site.squarespace.com and your homepage has the URL β€œ/home”, you can share the URL below. When this URL is clicked, the user will be able to view the site, despite the password.

https://your-site.squarespace.com/home/?password=demo


View JSON

Every Squarespace website is created in JSON-T. You can view a β€˜human-readable’ form of the JSON behind any Squarespace page by using the query ?json-pretty (as shown below). It is also possible to use ?format=json but this is more suitable for data processing as it isn’t very readable.

https://your-site.squarespace.com/?format=json-pretty


View CSS

To view the CSS being used on a Squarespace site, use the following query:

https://your-site.squarespace.com/site.css?minify=false

RSS Format

You can show a page’s collection data in RSS format using the following query. Note that this works for collections (such as blogs) not for standard pages.

https://your-site.squarespace.com/blog/?format=rss


Main content format

You can generate the HTML of the main content of a page (without CSS) by using the URL query below. Note that this is suitable for standard pages, not collections.

https://your-site.squarespace.com/?format=main-content

Edit a Squarespace site

To edit a Squarespace site, use the config path:

https://your-site.squarespace.com/config/

Extend a Squarespace trial

This is also a path rather than a query, but it’s a very useful shortcut to extend a Squarespace trial:

https://your-site.squarespace.com/config/extendtrial/

Safe Mode - Prevent code loading

You can put your site into a "safe mode" that prevents custom code from loading by adding "/safe". This is useful for troubleshooting a site to see if custom code is causing an issue.

https://your-site.squarespace.com/config/safe/

Smaller images

If you are loading an image from Squarespace you can use a URL query to specify the width of the image in pixels to download a smaller version of the image.

When you add an image to Squarespace, the platform automatically creates up to seven versions of that image, each with a different width. If your image is larger than 2500 pixels wide, it will create versions with the following widths:

  • 100 pixels

  • 300 pixels

  • 500 pixels

  • 750 pixels

  • 1000 pixels

  • 1500 pixels

  • 2500 pixels

The image’s aspect ratio will always be preserved because the height will change relative to the width. Squarespace's built-in responsive design should always pick the most appropriate image size based on the visitor's screen width and pixel density, but if you are manually loading an image into code or to another site such as Instagram or Facebook then you may want to control the image size.

For example, if you specify an image URL like the one below, the original version of the image should appear:

https://images.squarespace-cdn.com/content/v1/5d37161e0198630001386071/1564673273407-NI2Z1YS7KDZU0UA65IOJ/1509-10f-01_Watches_Details_0068-RGB.jpg

However, if you add a URL query of ?format=1500w you can download a version of the image that is only 1500 pixels wide:

https://images.squarespace-cdn.com/content/v1/5d37161e0198630001386071/1564673273407-NI2Z1YS7KDZU0UA65IOJ/1509-10f-01_Watches_Details_0068-RGB.jpg?format=1500w

Or you could use ?format=100w to view a version that is only 100 pixels wide:

https://images.squarespace-cdn.com/content/v1/5d37161e0198630001386071/1564673273407-NI2Z1YS7KDZU0UA65IOJ/1509-10f-01_Watches_Details_0068-RGB.jpg?format=100w

 
Previous
Previous

How to embed a PowerPoint Slideshow in Squarespace

Next
Next

How to integrate Royal Mail's Click and Drop service with Squarespace