I have site sujangarh.net it use a cPanel ( site is not made yet) i have addon domian rundir.com .---this is working fine but but it also work from rundir.sujangarh.net and sujangarh.net/rundir.com so i dont want serach engine to understand them as as duplicate URL what should i do
Never link from the main domain to to the sub or the directory. If you link, link to the addon domain.com only. It has never been a problem. If you still can, I would edit your initial post and replace the . with dot.
Just use a text editor # robots.txt User-agent: * Disallow: Disallow: /cgi-bin/ Something like above, save it as robots.txt and upload to your base directory
In the root of your domain sujangarh.net, add the following robots.txt file: User-agent: * Disallow: /rundir.com/
If you want to stop all access using sujangarh.net, one of the ways is to put this php code at the start of your index.php <?php if (strpos($_SERVER['PHP_SELF'],'sujangarh.net' ))// Return 404 error if URL contains sujangarh.net { header("HTTP/1.0 404 Not Found"); exit; } ?> PHP: This must be the start of the file before any output is sent.
Why don't you redirect[301] your subdirectory[folder] to your subdomain. I think that would be the best solution. Then you will be free from duplication and using any URL to link. This can be done through mod_rewrite rule in .htaccess file.