Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Regarding domain lock...

I put my first game on here yesterday, and to provide a domain lock I checked document.referrer like so:

Pseudo-code:
       if (window!=window.parent) HostCheck(document.referrer); // if in an iframe, get the referrer and check that.

It worked in all my tests and this way the hosting url doesn't matter because I test against my subdomain sclanim.itch.io

So my question is:

Is this okay? or is my method mistaken in some way?