The only share links you need

Stop linking to social media platforms to share content on your site.

Things have changed in how people use social media services. Users have become more savvy, choosing to copy and paste links themselves in their service, or services of choice. And browsers now have built-in sharing options that work based on services that users have. So there’s no need to guess on the sharing options you should provide for your visitors.

And there are more ways that people share links now. For example, it’s become common to use private messaging services, either one on one, or as part of a group, and links are definitely included among those services as well. Social media tools have become more pluralized.

Sharing options without platforms

So, instead of trying to account for all available options, we should now go with two universal ones: “Copy link” and “Send email”.

“Copy link”, would work as a convenient way to copy the current page URL to the visitor’s clipboard. Here is Javascript code that will do that:

async function copyShareLink() {
  let text = window.location.href;

  await navigator.clipboard.writeText(text);
  document.querySelector('#share-link').innerText = "Copied";

  setTimeout(() => {
    document.querySelector('#share-link').innerText = "Copy Link";
  }, 1000);

With the HTML that triggers it:

<a onclick="copyShareLink();" id="share-link">Copy Link</a>

And the CSS to make it feel like a link:

#share-link:hover {
  cursor: pointer;

“Send email”, uses the oldest standard for sharing a web page, email, which is still commonly used today, and is guaranteed to still be used in the future! You can set it up to launch the visitor’s email app with a new email draft.

Here's HTML + Javascript code that fills out the subject line with the page's title, and in the message includes the URL and the page's meta description, if available:

<a href="'mailto:?subject='+document.title+'&body='+encodeURIComponent(document.querySelector('meta[name=description]').content)+'%20'+encodeURIComponent(window.location.href));">Send Email</a>

You can see an example of the working code for both of these options at the end of this article's page.

Link in, not out

The rule of thumb to keep in mind when sharing with an audience, is to use social media platforms to share your content, but the content that you share should live on your own site, not other platforms. And while a user is on your site, they have options to get your content directly from you, including for following updates, like an email list, or RSS feed for blog posts. This ensures funneling people to you from social media platforms instead of promoting those platforms to your audience.

This doesn’t mean you shouldn’t talk about or link to social media platforms you’re on. But keep in mind that people will often decide to search for people they follow elsewhere on their platforms of choice and just being available (and active) on those platforms may be enough for them to find and follow you.

Thanks for reading! If you enjoyed this post, buy me a coffee to have something to sip on as I write my next one.

Consider sharing this post with others: copy this link | send an email

And follow my updates to get my latest posts.