One of the very first things you need to look into when setting up your WordPress Site is how you want your Links to appear.
This is very important because once you start using your links to your Posts on External Sites, you cannot change the format of your permalink as you will effectively break those links which will result in a 404 Page Not Found Error and we definitely do not want that to happen.
So be very careful that you set your permalinks up from the very beginning.
Go to the Permalinks Settings Page
In your WordPress Admin Dashboard, we want to Select Settings (1) then Permalinks (2).
Select your URL Format
What’s with the /site/ bit
When you install your WordPress Site from your Cpanel ( which most hosting now provides ) one of the questions is “Where” do you want to install your site? As I kind of have plans in adding in some custom scripts, I opted for a folder name of “site”, maybe due to a lack of foresight but time will tell. Now most folks would use “blog” or something like that, but I went ahead and chose “site”. That is something I have to live with, for now…
So making a long story short, the domain name is effectively https://timbrownlaw.com/site and you might be wondering how you get there when you type in just https://timbrownlaw.com. Well the answer to that question is for another post, but I am simply using a PHP redirect. Which makes me wonder why WordPress doesn’t add in or modify the .htaccess file to perform this automatically… Hmm, something to think about, but for now it’s not relevant.
Pick A Link Style
So for all my blogs since I started using blogs when WordPress was still drying the virtual ink from its guide pages… I chose “%postname% which you had to put in manually back in the old days, but they have since made it smarter now. It has it’s very own selection – Post name.
I always use %postname%
What if I am using something else, can I change it?
And now we get to the meat and potatoes of this post. I noticed a colleague of mine was using the Day and name format.
And so I asked… Had she been using these links, externally. And she replied “Yes”. The discussion then continued and she asked if she could change the permalinks and have the shorter version?
Well unfortunately the answer is No!
But you can shorten them manually.
What I did discover is that you can take the link like https://timbrownlaw.com/site/2024/07/29/sample-post/ and shorten it by hand to https://timbrownlaw.com/site/sample-post.
So you can use this shortened link externally.
So how does this work?
That’s a good question. With WordPress, every post and page has to have a unique name.
That makes sense, as it needs to, so that even the %postname% version works.
But what happens, in the case you have set your permalinks to “Day and name”, is that WordPress “finds” the post by name and internally appends the missing Day and name bits.
The short version is…
With permalinks set to Day and name, clicking on an external link that might look like
https://timbrownlaw.com/site/sample-post will show up on the blog as…
https://timbrownlaw.com/site/2024/07/29/sample-post/
And everyone is happy.
And as a plug…
Giving credit, where credit is due. This post was sparked by my good friend Linden Thorp. I saw the links she was using and I immediately raised an eyebrow and said I’d look into this.
Now Linden’s site URL of https://flourishwriteconsult.com/2024/07/22/designrr-io-review-the-best-tool-for-ebook-creation/ can be simply(er)
https://flourishwriteconsult.com/designrr-io-review-the-best-tool-for-ebook-creation/