own your links

From IndieWeb
(Redirected from ownyourlinks)


Own your links is the concept of creating links on your own website that redirect to other properties you own, for instance social media accounts or content you have created on other websites.

Why

By owning a link, you can change its destination as appropriate without having to rely on the owner of the site to which a link points setting up redirects if the link destination changes.

This may be useful if you change your profile name on a social media service. If someone takes your old profile name and you always link directly to your profile, people may not find the content to which you were linking when you first created the link.

Google site-specific searches with your site, will show content from sites you have setup such redirects for!

How to

To "own" a link, you should:

  • Come up with the name for your link and identify where it is going to point.
    • (i.e. example.com/github/ could point to github.com/<yourprofilename>)
  • Create a redirect on your site that points the name of your link to the destination.
  • Use your link when referring to the resource to which your link points.

For instance, Alice may create a page on her site with the URL example.com/twitter/. Alice uses this URL to link to her Twitter account rather than her main Twitter URL.

  • You may want to use a <meta> tag with HTTP-Equiv as part of a 302 Redirection (meta http-equiv status), however this is limited to a specific URL. See below for how to redirect all URLs that start with a particular path.

How to generically

For silos with deep links like GitHub and Twitter, it's better to use the name of the silo as your path, because the rest of the path is highly dependent on the silo.

For some silos with shallow or generic paths, you can use a generic name instead for redirecting.

For example, wiki silos often treat (most) paths a generic flat list of names of pages, thus for those you can use /w/ or /wiki/ or /topic/ as your redirect path.

How to Apache htaccess

If you use Apache with mod_alias enabled and can access your .htaccess file, you can add an instruction like

RedirectTemp /github https://github.com/yourGHusername

replacing "yourGHusername" with your GitHub username.

How to nginx config

You can use the following nginx config to own a link:

location ~ ^/github/(.*) {
     return 307 https://github.com/yourGHusername/$1;
}

replacing "yourGHusername" with your GitHub username.


Jacky Alciné uses a "one liner" approach as follows (within a server block)

rewrite ^(/github)(.*) https://github.com/jalcine$2 redirect;

IndieWeb Examples

Tantek

Tantek Çelik owns his links for:

Both of which show up in Google site-scoped searches as if they’re on his domain! E.g.

James

Matthias

 Matthias Pfefferle owns his links for:

Jacky Alcine

Jacky Alciné owns his links since 2022-07-27 for silo path redirects for /twitter and /github:

  • "Small QoL change to my site (on a proxy level): I've added support for "owning" my own URLs. So /twitter/status/1545916088956903424 properly redirects to Twitter and /github/sqlite-hypercore goes to the right place. Long-term goal is to retroactively update links on my site that point to myself to point to my site first so, later down the line, I can actually serve it from my site (and go to the silo if needed)." July 27, 2022

Add yourself!

Other Examples

See Also