Make page only accesable via root domain

pieter raxis

Newbie
Joined
Sep 16, 2018
Messages
5
Reaction score
0
Hi,

I use on one page copied content and block this page for google in .htacess. So it's not being indexed.
If other sites make links to this page, google will place it on serp.

So i'm thinking of making this page only accessible if a visitor clicks a link when they are on my domain.

I know a page knows who's refering to it so i guess ot can be done. I've searched the hell out of google but i cant see any info of what i need to do.

You guy's have an idea?
 
I understand,

But the robot has to be honest. i like blocking around the robots
 
if i understand correctly, you want this page is accessible only when user click on link from your homepage? If yes - create session when user access you homepage, after that check if session is started on "restricted page". You can set some value to session for extra security.
 
Just set noindex for your desired page in the robot file. The no one can access your page
 
try robots.txt rules

Thanks man.

I understand. i don't trust the robots so to make sure i want those pages with copied text to be never found. he, someone links to that page Google will crawl it anyway.
 
Well I don't really know to much about Apache, but do know a little on Nginx.

May be you can block the agents, IP, domain or a combination of them.

You can get some inspiration with https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker as an starting point, there are meant to block bad bots, but you can blacklist google's bots if you want.

Also notice those rules are for the entire website, so you should have to write them for your specific needs (one page).

Hope this some how help with for problem
 
I would use the rewrite options of your Webserver (Apache/nginx). Both support the
Code:
RewriteCond %{HTTP_HOST}
Parameter together with regular expression. So basically rewrite all request where Hostnamen not your Hostname reaching for your special site to index or whatever you want.
 
from the rewrite i thougt when i say only my domain as host its giving acces for that specific host. like your and mine comuter
 
Back
Top