permalink
This article is a stub. You can help the IndieWeb wiki by expanding it.
A permalink is a URL which typically represents and retrieves a single post (also explicitly called a post permalink).
Why
You should maintain permalinks to your posts so links to them keep working. This is the intent of "Cool URIs [sic] don't change"[1].
How
Design
Most projects have a very deliberate permalink URL design.
IndieWeb Examples
Barnaby Walters
Barnaby Walters uses Taproot running on waterpigs.co.uk:
- Articles
http://waterpigs.co.uk/articles/getting-started-with-microformats2/
- Notes
- . . .
gRegor Morrill
gRegor Morrill using ProcessWire on gregorlove.com:
- Permalinks begin with the year and month
/YYYY/MM/
followed by the slug
Ethan Yoo
Ethan Yoo using Hugo on ethanyoo.com:
- Like gRegor, Ethan's permalinks begin with the year and month (
/YYYY/MM/
) and are followed by a slug. Including the month allows him to use the same slug across different months. For example: Black Lives Matter (August 2020) and Black Lives Matter (October 2020) both use the slug "black-lives-matter."
The Doctor
User:Drwho.virtadpt.net using Pelican for drwho.virtadpt.net:
- The Doctor's permalinks have changed a bit since changing CMSes a couple of years ago but have settled into a format that reflects where the post is at in its lifecycle (
archive
), a not-quite-ISO-8601 timestamp (more granularity than the calendar day is not required in this case) (YYYY-MM-DD
), and then the slug. Unfortunately, this does not lend itself to re-use of titles/slugs in the git repository used to hold the Markdown documents of the site's content.
Project Examples
WordPress
WordPress (open source) supports the following permalink structures:
- Day and name
http://example.com/2014/03/27/sample-post/
- Month and name
http://example.com/2014/03/sample-post/
- Numeric
http://example.com/archives/123/
- Post name
http://example.com/sample-post/
- Custom structure
- Using a combination of WordPress structure tags
Coping with loss of
Permalinks die every year. If you're able to export your content you can rehost it on your own site, but the problem of dead permalinks remains. There are approaches to making dead permalinks at least discoverable, e.g. by searching for the text of a permalink URL in a web search engine.
archive page with old permalinks in cleartext
One approach is to publish an archive page that provides cleartext URLs (but not hyperlinked) of your dead permalinks, along with their new locations, e.g.:
- Jon Udell's 2002-2006 index of his blog posts that were originally published at weblog.infoworld.com/udell.
new URLs with old permalinks in path
Another approach is to create new pages with URLs that have the old permalinks as part of their path, and then also link to those new URLs from an archive page using link text of the old domain and path . E.g.:
- microformats tr.im equivalents for shortlinks at the now defunct tr.im link shortener. E.g.:
- microformats.org/wiki/tr.im/ufprs for the dead link tr.im/ufprs
Changing Permalinks to posts
When restructuring the permalink design on an indiewebsite, it is recommended to send an HTTP 301 permanent redirect response from the older permanlink to the newer one (see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Response_codes ).
Such a redesign can affect other aspects of an indiewebsite some of which are documented below
- If comments and responses to a post are identified using the post permalink, then these should be updated to point to the new permalink.
- Posts on other websites might still link to the old permalink and might send webmentions to it. The webmention receiving code should suitably recognize these as webmentions to the new permanlink.
- Bridgy using posse-post-discovery might resend some backfeed webmentions to the new permalink. These should be suitably de-dupped.
Redirecting old URLs with Hugo's alias mechanism
When the front matter includes one or more aliases, Hugo adds the following HTML code to a page generated for the old URL (i.e., the alias of the new URL).
<head>
<title>https://example.com/posts/my-intended-url</title>
<link rel="canonical" href="https://example.com/posts/my-intended-url"/>
<meta name="robots" content="noindex">
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="refresh" content="0; url=https://example.com/posts/my-intended-url"/>
</head>
The above code redirects users to the new URL and tells search engine robots not to index this older page.
See Also
- permashortlinks
- IndieArchive
- posts
- short-domains
- slug
- https://twitter.com/brea_manuel3/status/1294021032152641538?s=20
- "When it’s your first paper and you’re extreme. 💗" @brea_manuel3 August 13, 2020
- On Permalinks and Paradigms… on the history and value of permalinks
- Twitter introduced permalinks for tweets in 2006 https://mastodon.cloud/@vacapinta/109309183030156032
- "@bastianallgeier I joined Twitter in 2006 in order to set up a group SMS. That is about all it really did. No real community, no reply feature, no hashtags. Here's an email I got in October 2006 introducing...permalinks!!" @vacapinta November 8, 2022