Whenever we publish a blog post, WordPress generates a unique URL for it automatically.
For example, in the last lesson, I published a blog post, and WordPress generated this URL:
http://criyasoft.local/the-basics-of-invoicing/
You can also see and change this URL inside the “Summary” settings of the blog post:
In the above video, I showed how to change the blog post’s URL.
My blog post URL is local because I am creating my website locally using LocalWP.
http://criyasoft.local/the-basics-of-invoicing/
I didn’t purchase my domain name yet!
So, my blog post URL is not accessible outside my computer.
But if you purchased a public domain name for your website, WordPress generates a URL like this with the purchased domain name:
http://domain-name.com/the-basics-of-invoicing/
It is a public URL, and anyone on the internet can access it.
So, you can share this public URL directly with friends, family, and other visitors so that they can view the blog post.
Also, search engines like Google use this public URL inside its search results page so users can visit your blog post.
Having said that, be it a local or public domain URL, the URL acts like a unique address for a particular post or page.
And without it, people can not view or access your post.
Anyway, next, I have an important question to ask you!
What makes a blog post URL unique?
…
…
Think!
…
…
The answer is something called a Permalink.
http://criyasoft.local/the-basics-of-invoicing/
If you notice the above URL of a blog post, it is divided into two parts:
The Permalink is the unique identifier for the blog post, and no two posts on WordPress can have the same Permalink.
Even if you force WordPress to use the same Permalink for two different posts, WordPress doesn’t allow it.
The primary purpose of a permalink is to make URLs human-readable.
In other words, a permalink should help the visitors to understand what the blog post is all about.
So, usually, the blog post’s Permalink is generated based on the blog post’s title.
For example, the title of my first blog post is “The Basics of Invoicing”.
And based on it, WordPress generated the Permalink as “the-basics-of-invoicing”.
Having said that, there is one more important characteristic of a permalink.
If you notice the title and the Permalink generated from that title, there are two important differences.
This is because a URL replaces white spaces with “%20
” character:
http://criyasoft.local/the%20basics%20of%20invoice
Is it easy to read?
No, right?
So, when generating the Permalink, WordPress replaces the white space characters with hyphens.
To improve the readability even further…
When generating a permalink, if WordPress sees capital letters inside the title, they will be replaced with small letters to make the URL more readable.
Tell me something, which Permalink is more readable?
Is it A or B?
Please take your time.
…
…
Think!
…
…
It is “A” because the capital letters next to hyphens make the option “B” hard to read.
Anyway, that’s all you need to know about permalinks for now.
We will learn how to change the Permalink in the next module.