Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

98
Views
Trying to prevent domain mirroring

My URL = mysiteurl/example-post

URL B = mirroringsiteurl/example-post

All HTML code at "URL B" is the same as the one at my URL, and when I change anything at my site, "URL B" will be refreshed to be identical to my site.

The only difference is that the mirrored site has different CSS colors and branding.

I was advised to look at a JavaScript solution that checks document.location.href and if it's not my site, redirects it somewhere else.

Would something like this help?

// Blocking 1 
if (parent.frames.length > 0) { parent.location.href = self.document.location } 

// Block 2 
var domain = "mysiteurl"; <--- at this they auto change my domain to their domain

var redirect = "http://google.com"; if( (location.hostname != domain) && (location.hostname != "www."+domain) ) { location.href = redirect; } 
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!