The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

So Long Pretty URLs

TL;DR

I've removed title text and switched to IDs for my site URLs to make them easier to maintain.

TODO: Pull subtitle into page object

Uniform Resource Locators

Ideally, URLs would live forever. Turns out, that's hard to manage. Sites die and take their URLs with them. Even more, sites change the software that runs them which results in content moving to different URLs or disappearing all together.

I've changed software for my site several times over the past twenty years. Each time involved moving the URLs. The primary problem with that is it breaks any links that point to them. I put in redirects to handle that. They catch traffic pointed to the old URLs and send it to the new locations.

That works, but I've only do it for the most recent migration. I've done three or four since 2010 which means any links that point to URLs from that time period are now dead.

Aesthetics and Search Engine Optimization

For a few of the moves, changing the URLs helped get traffic to the site. Adding keywords and titles to the URLs worked as a way to get higher page ranks on search engines. As far as anyone can tell, that doesn't matter much these days. Even if it does, I no longer worry about it.

Beyond the search engine optimization, there's also an aesthetic quality to URLs. In an older version of my site, I spent a bunch of time setting things up to get URLs that were nothing by the domain name and the title of the page.

For example, the URL for this page would have been:

]alanwsmith.com/so-long-pretty-urls]class: url]

I still love the look of that. There's nothing there that doesn't need to be.

Everything's A Draft

I'd still be using those URLs except for one thing. They're based off the title of the post and I change those titles all the time.

My site is an extension of my

Unlike changing software I have the option of leaving the URLs the same and simply letting them get out of sync with the title of the post. But, part of the reason I like the title based URLs is because the aesthetic ties to the title on the page.

So, we're back to redirects.

A Unique ID

One way to do redirects is to point all the old URLs to the new locations. That seems simple enough at first, but there's a complexity. What if you move a URL two times. Or, three. Or, ten.

You have to maintain a list of _all__ the previous URLs and make sure they redirect properly. This can be done and automated, but you'd have to accommodate the full list across software changes as well.

Besides being fragile, doing that work is not where I want to spend my time. So, I used another system: a unique ID at the end of every URL. They end up looking like this:

]alanwsmith.com/so-long-pretty-urls--2zqjnh3a]class: url]

It's the same as before with the addition of a unique ID at the end. The power of this ID comes from the fact that it's the same for the page regardless of title changes. That let's me set them up so that if a request for a URL comes in that's no longer valid I can use it to redirect to the new one. So all of these:

]alanwsmith.com/i-removed-pretty-urls--2zqjnh3a]class: url]

]alanwsmith.com/no-more-pretty-urls--2zqjnh3a]class: url]

]alanwsmith.com/goodbye-pretty-urls--2zqjnh3a]class: url]

would all redirect to this automatically:

]alanwsmith.com/so-long-pretty-urls--2zqjnh3a]class: url]

Just An ID

That covers things, but it still takes work to implement. It also means I have to make sure the content actually gets removed from the proper URL. As before, this can all be done with code, but coding that is not where I want to spend my time.

So, I'm going the next step. I'm removing the title text all together. My URLs now look like this:

]alanwsmith.com/pages/2zqjnh3a]class: url]

With that change all the redirect work goes away.

The 20 Year Plan

My site is twenty years old. When I realized that, I started thinking about the next twenty years. A big part of that is thinking about what I want to spend my time working on. Redirects aren't it.

I'd rather spend time working on the content than jumping frameworks or setting up redirects. That lead me to create my own file format (neopolitan) and my own static site generator (neopoligin).

It also lead me to this decision.

I want my URLs to last, but I don't want to have to futz with them. And now, I don't have to.

Note: Human Readability

I didn't explicitly get into the human readability of URLs, but that's where the aesthetic design came from. I'm not sure how much it ever really mattered, but being a techie I really like URLs that you can read and know what they are. But, the amount of work it would take to make that happen simply isn't worth it to me any more.

Note: The Pages

You may have noticed I added a "pages" directory level to the URLs. That's purely to make it easier to see content when I'm working on pages output my grimoire. Everything from the grimoire gets an ID when they are created. Things outside the grimoire get named by hand.

Since I work with a

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

So Long Pretty URLs

-- tldr/

I've removed title text
and switched to IDs for my site 
URLs to make them easier to maintain.

-- /tldr


-- h2

Uniform Resource Locators

Ideally, URLs would live forever.
Turns out, that's hard to 
manage. Sites die and take
their URLs with them. Even more, 
sites change the software that runs 
them which results in content moving 
to different URLs or disappearing all 
together.

I've changed software for my site several 
times over the past twenty years. Each time
involved moving the URLs. The primary problem
with that is it breaks any links
that point to them. I put in redirects
to handle that. They catch traffic pointed
to the old URLs and send it to the
new locations. 

That works, but I've only do it for the
most recent migration. I've done three
or four since 2010 which means any
links that point to URLs from that time
period are now dead.

-- h2

Aesthetics and Search Engine Optimization 

For a few of the moves, changing the URLs
helped get traffic to the site. Adding
keywords and titles to the URLs worked
as a way to get higher page ranks on
search engines. As far as anyone
can tell, that doesn't matter much
these days. Even if it does, I no 
longer worry about it. 

Beyond the search engine optimization, 
there's also an aesthetic quality to URLs. 
In an older version of my site, I spent 
a bunch of time setting things up to get
URLs that were nothing by the domain
name and the title of the page. 

For example, the URL for this page would
have been:

]alanwsmith.com/so-long-pretty-urls]class: url]

I still love the look of that. There's
nothing there that doesn't need to be. 

-- h2

Everything's A Draft

I'd still be using those URLs except for
one thing. They're based off the title
of the post and I change those titles
all the time. 

My site is an extension of my >grimoire>/grimoire>. 
It has over nine thousand notes in it
and I'm adding more all the time. Most
start out as snippets that I ship
to the site as very early drafts. The
titles change as the pages mature. 

Unlike changing software I have the
option of leaving the URLs the same
and simply letting them get out of
sync with the title of the post. But, 
part of the reason I like the title based URLs is 
because the aesthetic ties to the title
on the page. 

So, we're back to redirects. 

-- h2

A Unique ID

One way to do redirects is to point
all the old URLs to the new locations. That
seems simple enough at first, but there's
a complexity. What if you move a URL
two times. Or, three. Or, ten. 

You have to maintain a list of _all__ the
previous URLs and make sure they redirect
properly. This can be done and automated,
but you'd have to accommodate the full
list across software changes as well. 

Besides being fragile, doing that work 
is not where I want to spend my time. So,
I used another system: a unique ID at the
end of every URL. They end up looking like
this:

]alanwsmith.com/so-long-pretty-urls--2zqjnh3a]class: url]

It's the same as before with the addition
of a unique ID at the end. The power of
this ID comes from the fact that it's
the same for the page regardless of title
changes. That let's me set them up so
that if a request for a URL comes in
that's no longer valid I can use it to
redirect to the new one. So all of these:

]alanwsmith.com/i-removed-pretty-urls--2zqjnh3a]class: url]

]alanwsmith.com/no-more-pretty-urls--2zqjnh3a]class: url]

]alanwsmith.com/goodbye-pretty-urls--2zqjnh3a]class: url]

would all redirect to this automatically:

]alanwsmith.com/so-long-pretty-urls--2zqjnh3a]class: url]

-- h2

Just An ID

That covers things, but it still takes work
to implement. It also means I have to make
sure the content actually gets removed from 
the proper URL. As before, this can all be done
with code, but coding that is not where I want
to spend my time. 

So, I'm going the next step. I'm removing the
title text all together. My URLs now look
like this:

]alanwsmith.com/pages/2zqjnh3a]class: url]

With that change all the redirect work
goes away.



-- h2

The 20 Year Plan 

My site is twenty years old. When I realized
that, I started thinking about 
the next twenty years. A big part of that
is thinking about what I want to spend my 
time working on. Redirects aren't it. 

I'd rather spend
time working on the content than
jumping frameworks or setting up redirects.
That lead
me to create my own file format (<<link|neopolitan|/neopolitan/>>)
and my own static site generator (<<link|neopoligin|/neopoligin/>>). 

It also 
lead me to this decision. 

I want my URLs
to last, but I don't want to have to 
futz with them. And now, I don't have to.

-- hr

-- note
-- title: Note: Human Readability 

I didn't explicitly get into the human
readability of URLs, but that's where
the aesthetic design came from. I'm not
sure how much it ever really mattered, 
but being a techie I really like URLs
that you can read and know what they
are. But, the amount
of work it would take to make that happen
simply isn't worth it to me any more. 


-- note
-- title: Note: The Pages

You may have noticed I added a "pages"
directory level to the URLs. That's purely
to make it easier to see content when 
I'm working on pages output my grimoire. 
Everything from the grimoire gets an 
ID when they are created. Things outside 
the grimoire get named by hand. 

Since I work with a >static site generator>/neopoligin>
that uses a directory structure it helps
to keep the thousands of grimoire pages separate
from the few I edit by hand so that I
can find them easily.


-- css

.url {
  color: goldenrod;
  margin-left: 2rem;
}

-- categories
-- Site 

-- metadata
-- date: 2023-12-21 02:30:40
-- id: 2zqjnh3a
-- site: aws
-- type: post
-- status: published 


-- blurb

In which my URLs become less
human readable

-- comment

Old redirects file: https://gist.github.com/alanwsmith/2ec0ac3ff59cbde1228b7d52b174a5ed