This is an example on how to implement sitelocking in unity.
Since pirating a game in web is relatively easy, you should sitelock your builds. Luckily this is pretty simple, all that is needed is this script https://github.com/JOrbits/UnitySitelockingExample/blob/main/WebGLWhitelist/Assets/Scripts/AntiPiracy.cs which can be modified as needed.