0

I am working on a website that contains pages that some contributors do not want posted on social media, but they still want pages to be indexed by search engines.

For these pages, we add robots meta tags/HTTP headers to say "noarchive, nosnippet", and if we receive requests from user agents associated with social media such as Facebook, then we return HTTP 401.

We also include some text in the "license" portion of the schema.org markup to state that the pages should not be shared on social media or embedded in web pages without permission.

Is there a way to specify in metadata (schema.org, opengraph, etc) that web pages or images should not be shared or embedded? I'd rather do that than to rely on explicitly blocking user agents.

  • I should add that I am aware that this won't prevent someone from separately downloading an image and re-posting it as their own. But I'd like to add something to the markup that well-behaved robots won't include content or will warn the user, if such a feature exists. – Rob Aug 15 '18 at 15:33
1

You can not prevent users from posting your links on Facebook, Twitter or any other social media platform, this is because a link itself holds no copyright or infringement, even terms, conditions and licensing.

You can, however, block various social media sites from taking the description from the page and the images embedded on the page. This is simply done by blocking their crawler using robots.txt, for example, Facebook uses:

facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)

facebookexternalhit/1.1

So robots.txt would look something like this:

User-agent: facebookexternalhit
Disallow: /

Not using Open Graph

Most popular social media sites use Open Graph, so the logic would be not to use Open Graph if you do not want snippets of information being revealed on social media, again you can't block social media. If you do not want links to access via social media then you should a have login based system.

Force Redirect

Force redirects based on user agent generally don't work on most social media because the only reason their crawler visits your site is to obtain snippet information, which is prevented using user agent with robots.txt, so for example using:

<?php
    if(strstr($_SERVER['HTTP_USER_AGENT'],'facebookexternalhit') || strstr($_SERVER['HTTP_USER_AGENT'],'facebookexternalhit')){  
        header('Location: http://google.com/iphone');
        exit();
    }
?>

Would not prevent your link being shared on Facebook as the link would still be accessible but without a mini description.

Summary...

You can not prevent the links to your pages being shared on any platform, never mind social media. If user-generated content writers do not want their content found on social media, then you must make it authentication and then, of course, you won't be indexed by Google either.

Lastly...

There is no such law that prevents users copying and pasting links on 3rd party websites, no matter what your license says, it would never stand up in court. You could, however, request the links to be removed by the 3rd party.

  • You've not read my post clearly. The user agents are already blocked. And I'm aware that this won't entirely block users from posting content. I am just wondering if there are any metadata tags that Facebook, Twitter, G+ etc recognise so that they won't post snippets or embedded images. – Rob Aug 15 '18 at 15:21
  • I did read it, my answer is intended for other users, so if there's stuff you know, great. Schema and OpenGraph are for adding data, not removing it. Meta tags such as noarchive, nosnippet are intended for search engines and sites that cache content, links are not content. – Simon Hayter Aug 15 '18 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.