Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.4.3, htaccess, images, private, robots.txt
- This topic has 7 replies, 2 voices, and was last updated 10 years, 11 months ago by
Steven Zahm.
-
AuthorPosts
-
09/13/2015 at 12:17 am #346504
Michael Green
ParticipantI’m using Connections Pro for a private member directory in a church setting, so users much login before they can access any of the directory entries.
It was recently brought to my attention that if people googled their name, results would come up pointing to the directory listing where the connections pro image is sitting, then the image can be viewed/downloaded (without having being logged in first).
Can anything be done to protect the privacy of these profile images to ensure only members logged in can see them? Thanks.
09/14/2015 at 11:22 am #346650Steven Zahm
Keymaster@ Michael
You need to add rules to your
robots.txtfile to prevent Google and other search engines from crawling the../wp-content/uploads/connections-images/folder.Here’s a very through tutorial/overview of the
robots.txtfile:https://www.elegantthemes.com/blog/tips-tricks/how-to-create-and-configure-your-robots-txt-file
Additionally, you can add the no indexing rule to an
.htaccessfile. I use to do this automatically but unfortunately some hosts would return 404 errors for the images due to the way the server was configured.That said, something like this should do the trick:
User-agent: * Disallow: /wp-*This should actually prevent all search engines from indexing all files and folders within any folder that begins with
wp-. And the.htaccessgo into your site’s root folder where thewp-config.phpfile is. You likely already have this file, so you would simply add this to the top of the file.A more conservative `.htaccess rule would be:
User-agent: * Disallow: /wp-content/uploads/connections-images/* Options -IndexesYou would create a new
.htaccessfile and put it in the../wp-content/uploads/connections-images/folder.After you make these changes… you need to remove the links from the Google index. You can do this by using the Google Webmaster Tools. You can opt not to do this and the images will eventually be removed by Google since they will no longer be indexable.
Hope that helps!
09/19/2015 at 4:46 am #347275Michael Green
ParticipantHi Steven,
Thank you so much for your prompt reply and assistance as always. Sorry I didn’t have time to look into this until now as some other issues came up.
I’ve ran through the instructions, I believe have been done correctly but waiting for the request for the removal of the cached entries in google to be 100% sure they don’t reappear on google from further indexing.
Some questions, more for my own understanding…
- The robots.txt is just a standard to request search engines etc not to index certain directories, so google etc would comply but this doesn’t change anything in the way of actually accessing the file.
- The .htaccess entries basically prevent any files from being listed in the connections-images folder (and sub-folders I’m assuming?). So this is something enforced by the web server / host right?
- From my understanding, if someone already knew the full URL of the image file, that is not blocked right? Unfortunately if someone was determined enough and simply knew a persons firstname/lastname and the directory structure of the plugin they would be able to access the image file (to my understanding). Is there any further way around this to restrict these images to be provided to logged in members only or this is a bit difficult?
Thank you kindly.
09/21/2015 at 10:46 am #347526Steven Zahm
Keymaster@ Michael
re: The robots.txt is just a standard to request search engines etc not to index certain directories, so google etc would comply but this doesn’t change anything in the way of actually accessing the file.
Correct.
re: The .htaccess entries basically prevent any files from being listed in the connections-images folder (and sub-folders I’m assuming?). So this is something enforced by the web server / host right?
Correct.
re: if someone already knew the full URL of the image file, that is not blocked right?
Correct, the URL needs to be publically available in order for it to be displayed by the browser.
re: if someone was determined enough and simply knew a persons firstname/lastname and the directory structure of the plugin they would be able to access the image file
They would also need to know the exact name of the image file. If you use the
.htaccessto block directory listing, there would be now way for someone to see the file names so they would not be able to guess the file name unless you name them with names that are easily guessable, like first and last name.re: Is there any further way around this to restrict these images to be provided to logged in members only or this is a bit difficult?
Upload your images with unguessable file names.
Hope that helps!
09/21/2015 at 10:39 pm #347631Michael Green
ParticipantOf course! I was under the misunderstanding that the lastname-firstname format of the images was something Connections plugin was putting in based on the entry when the image was uploaded, now I realise it just picks up the filename so I could use a random string on the filenames before uploading to help obfuscate it. So while we can’t completely restrict it we can make it extremely difficult to guess.
Steven, as always thank you kindly for your prompt responses and support on this plugin, much appreciated!
09/22/2015 at 8:35 am #347738Steven Zahm
Keymaster@ Michael
Thanks! If you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!
https://wordpress.org/support/view/plugin-reviews/connections
09/22/2015 at 9:29 am #347744Michael Green
ParticipantOh okay – done. :-)
Thanks again!
09/22/2015 at 9:41 am #347749Steven Zahm
KeymasterThanks!
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
