Why do some publications use article IDs in post links? Like HBB does.
Why do publications use article IDs in post links?
Hi @arunsathiya, I think itâs a complicated question, but Iâll try my best to answer:
Earlier Google âofficiallyâ said that they prefer URLs with unique IDs so that itâll be helpful for them to analyze or something and itâs easy for Google News as well. So this was one of the main reasons why most of the old WordPress blogs preferred %post_id% thing. But later Google removed this from their official doc, and they are okay with âNews Sitemapâ now.
Apart from this, according to me, I wouldnât prefer example.com/hello-word format for âpostsâ, because this is how a page should look for me. Again, I wouldnât prefer example.com/category/hello-word format for âpostsâ, because I keep on changing the categories like ânewsâ, âhow-toâ, blah blah⌠my mind is a monkey.
We all know we hate when we see outdated articles, take this article for example, even though they might have covered all the latest tips, when they see â2014â in the âURLâ, itâll be kinda hard for us to click. Possible right?
So, finally and finally, the only possible format I can think of is:
âhttps://devicebar.com/articles/essential-tips-improve-mac-battery-life/89/â
Iâm sure the âpost idâ in the URL will be as long as â3245345344â after a few years, but I donât think thatâll bother me, most of the forums have this âunique idâ in their URLs, take Discourse or Stack Exchange for example. This might also help the server to properly assign each and every âuniqueâ thread.
Iâm still researching for a proper reason, Iâll definitely update that here soon.
Thatâs a neatly done answer, thanks. This gets me thinking about something.
If we link post IDs to blog posts, we can use the slug hello-world for different purpose actually. What if we are launching a product named âhello worldâ? We can use it then. Like, how Ixigo uses glass for ixigo.com/glass.
This is actually a great choice!
Now, how can I activate this for all my WordPress posts and enable this for all future posts as well?
I may not be in a position to agree or disagree mate, itâs just a preference to be honest.
Take ShoutMeLoud or PhoneRadar for example, they have example.com/hello-world format only.
Itâs like⌠they want to keep it neat and they keep on updating all the popular posts with new content.
âhttps://www.shoutmeloud.com/earn-money-from-blog.htmlâ
The same goes for WPBeginnerâŚ
Okay, so can you kindly tell me your current WordPress permalink format and your desired permalink format as well? Like, the full URL format. I can check both and give you .htaccess code for proper redirection.
/post-slug to /post-slug-articleID.
Without breaking the existing content, properly redirected, please. Thanks!
On that note, what happens to social cards? Facebook, Twitter and other network card data.
For this redirection, I feel this .htaccess code will help mate:
RedirectMatch 301 ^/([^/]+)/$ https://strikebuys.com/$3-$4/
Iâm not an expert, but I honestly feel this will redirect properly, kindly check and update me bro.
I lost most of them bro, even when I migrated from âhttpâ and âhttpsâ I faced this issue with some social networks, but itâs a hard changeâŚ
Sorry for not being clear earlier, bro. I meant to ask: if I change to /post-slug-articleID format, will I be able to retain the social card data for posts shared earlier on my Facebook and other networks? I hope the social network crawlers will not reindex it. But, anyway, let me check it. Thanks!
I answered for this only bro, I was not able to retain all those data, I did the redirection long back, Iâm not sure whether anything changed at present though.