How to stop google indexing of /~
Some of my client's websites are now showing up in google as mydomain.com/~theirsite. How can I prevent Google from indexing anything in mydomain.com/~. I tried to change the robots.txt file but the google search console still shows the URLs as allowed.
-
Hello :), You can disable apache mod_user tweak for your account. Please check following documentation. Apache mod_userdir Tweak - Documentation - cPanel Documentation 0 -
Hello, The previous post is accurate. You can disable Apache Mod_Userdir via "WHM Home >> Security Center >> Apache mod_userdir Tweak" to ensure that URL is not accessible. Thank you. 0 -
Thank you for your replies. However, I do not want to turn off the userdir tweak. Got it working now. Updated robots.txt with the following: Disallow: /~*/ Tested in Google Search Console. Looks like it requires the trailing / to work properly. 0 -
I'm happy to see you were able to find a suitable entry for your robots.txt file. Thank you for updating this thread with the outcome. 0
Please sign in to leave a comment.
Comments
4 comments