Getting Started > Installation

Installation

It only takes a few minutes to install Photolock on any website. Once installed, you’ll be able to control & limit actions that your website's visitors can perform on your site.

Note: You'll need a Photolock trial or subscription to install the code.

We also provide installation guides for popular platforms:

Shopify
Squarespace
3DCart

Install the JavaScript code

We offer automated installation for Shopify stores. Manual installation is required for all other websites. 

Just copy the first code snippet in your Photolock settings, where we pre-populate your website id (this is called your shop or website domain in the code) for you.

Or you can quickly grab it from here instead:

<script type="text/javascript" id="photolockScript" src="https://www.photolock.io/lock.js?shop=mywebsite.com" async defer></script>
<noscript id="photolockNoscript"><style>body *{display:none}body:before{content:"Please enable javascript to view this site"}</style></noscript>

How to use the code 

  • Paste the code right before the closing head tag of every page.
  • IMPORTANT: If you copy the code snippet above you'll need to manually change your shop (this is called your shop or website domain id in the code). 


Configure Domain:

After you install the script on your site, open your Photolock dashboard, and click "Locks" in the navigation menu.

Find Website settings and add your custom domain.

Website Domain Settings

Your website domain must match the value here. Most websites these days use multiple domains. At a minimum, you have a domain with "www" and also a root domain as shown below.

www.mysite.com
mysite.com

Photolock only accepts a single domain. Therefore it is important to configure a primary domain for your website and add redirects to the primary domain. In case users visit your site with other domains and there are no redirects to the primary domain, Photolock will not activate.

Configuring URL forwarding in Cloudflare


Now you're ready to start using Photolock. 


Last Updated: September 9, 2020