I-WordPress: Susa kwaye uqondise kwakhona i-YYYY / MM / DD Ulwakhiwo lwePermalink kunye neRegex kunye nenqanaba leMathematics SEO

Phinda uthumele i-YYYY / MM / DD Regex yeWebhusayithi yeWebhusayithi yeWebhu ye-SEO

Ukwenza lula ulwakhiwo lwakho lwe-URL yindlela elungileyo yokwenza indawo yakho isebenze ngezizathu ezininzi. Ii-URLs ezinde kunzima ukuzibandakanya nabanye, zinokunqunyulwa kubahleli beetekisi kunye nabahleli be-imeyile, kunye nolwakhiwo olunzima lwe-URL olunokuthumela imiqondiso engalunganga kwiinjini zokukhangela ngokubaluleka komxholo wakho.

Ulwakhiwo lweYYYY / MM / DD

Ukuba indawo yakho ibinee-URLs ezimbini, yeyiphi ocinga ukuba inike inqaku ngokubaluleka okungaphezulu?

  • https://martech.zone/2013/08/06/yyyy-mm-dd-regex-redirect OR
  • https://martech.zone/yyyy-mm-dd-regex-redirect

One of the default setups for WordPress is to have a permalink structure on the blog that includes the yyyy/mm/dd within the URL. This isn’t ideal for a couple of reasons:

  1. UkuSebenza kweeNjini zoPhando (SEO) – As discussed above, the hierarchy of the site is basically showing search engines that the content is 4 folders away from the home page… so it’s not important content.
  2. Iphepha leNjini yokuKhangela (SERP) – You may have a fantastic article on your site that you wrote last year but that’s still valid. However, other sites are publishing more recent articles. If you viewed a date structure that was a year ago in the search engine result page (SERP), would you click the older article? Probably not.

Inyathelo lokuqala ekufuneka ulithathile kukuhlaziya Useto> Iipermalinks kulawulo lweWordPress kwaye wenze nje imvume yakho /% igama lefayile% /

Useto lwe-WordPress Permalink

This; however, would break all of your existing post links on your blog. After having your blog live for a while, it’s not fun adding redirects for every one of your old articles. That’s okay because you can utilize a Regular Expression (Regexukwenza oku. Ibinzana eliqhelekileyo likhangela ipateni. Kule meko, intetho yethu yesiqhelo yile:

/\d{4}/\d{2}/\d{2}/(.*)

Ibinzana elingentla liphuka ngolu hlobo lulandelayo:

  • / \ d {4} ijonge is slash kunye namanani ama-4 amanani amele unyaka
  • / \ d {2} ijonge is slash kunye namanani ama-4 amanani amele inyanga
  • / \ d {2} ijonge is slash kunye namanani ama-4 amanani amele usuku
  • / (. *) uthabathe nantoni na esekupheleni kwe-URL ibe ngumahluko onokuthi ubhekise kuwo. Kule meko:

https://martech.zone/$1

Le yindlela ejongeka ngayo ngaphakathi Isikhundla se-Math SEO iplagi (edweliswe njengenye yethu iiplagi ezithandwayo zeWordPress), just don’t forget to ensure the type is set to Regex ukwehla:

ukuphinda uqondise kwakhona izibalo

Ukususa iBhlog, iCandelo, okanye amaGama amaCandelo okanye iMinye iMiqathango

Ukususa iBhlog – If you had the term “blog” within your permalink structure, you can utilize Rank Math SEO’s redirections to populate

/blog/([a-zA-Z0-9_.-]+)$

Notice on this, I didn’t use the (.*) option since that would create a loop if I had a page that was just /blog. This requires that there’s some kind of slug after the /blog/. You’ll want to redirect this just as above.

https://martech.zone/$1

Udidi lokususa -Ukususa udidi Ukusuka kwislug yakho (ekhoyo ngokungagqibekanga) hambisa ifayile Uluhlu lwePlagi SEO iplagi enokukhetha uku icandelo lomcu ukusuka kubume be-URL kuseto lwabo lwe-SEO> Amakhonkco:

Inqanaba leMathematics Strip kwiLinks

Ukususa iindidi – If you had categories, you’ll want to be a bit more careful and create an array of the exact category names so you don’t accidentally create a circular loop. Here’s that example:

/(folder1|folder2|folder3)/([a-zA-Z0-9_.-]+)$

Again, I didn’t use the (.*) option since that would create a loop if I had a page that was just /blog. You’ll want to redirect this just as above.

https://martech.zone/$1

Ukubhengezwa: Ndingumthengi kunye nendibaniselwano ye Inqanaba leZibalo.

Ingaba ucinga ntoni?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda indlela idatha yakho yokubhaliweyo isetyenziswe ngayo.