Modify your .htaccess
file to prevent other domains from displaying your website via iframe or proxy.
Add this to your .htaccess
file:
# Block iframe embedding
Header set X-Frame-Options "SAMEORIGIN"
# Prevent other domains from proxying your site
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(yourwebsite\.com|www\.yourwebsite\.com)$ [NC]
RewriteRule ^(.*)$ - [F,L]
Replace yourwebsite.com
with your actual domain.
This blocks unauthorized access while allowing normal visitors.
Leave a Reply