Mobile app version of vmapp.org
Login or Join
Caterina187

: Random domain pointing to my domain A random person has pointed their domain to my website. I don't have much experience with websites, but I know a bit. What can I put in .htaccess to give

@Caterina187

Posted in: #Domains #GoogleSearch #Htaccess #Redirects

A random person has pointed their domain to my website. I don't have much experience with websites, but I know a bit.
What can I put in .htaccess to give a 403 error if they try to access from a certain domain?

And I would also need to block the other pages in my site showing up on Google,
e.g. mysite.com/help

Sorry if I phrased that strangely, I don't know the correct terminology.

This is my .htaccess so far:

RewriteCond %{HTTP_HOST} !^(www.)?nameofmysite.com$ [NC]
RewriteRule ^ - [F,L]

RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteRule ^ %{HTTP_HOST}%{REQUEST_URI} [L,R=301]

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Caterina187

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme