WordPress: Regex va Rank Math SEO yordamida YYYY/MM/DD doimiy aloqa tuzilmasini olib tashlang va yo'naltiring.

YYYY/MM/DD Regex WordPress Rank Math SEO -ni qayta yo'naltirish

URL-tuzilishingizni soddalashtirish bir qator sabablarga ko'ra saytingizni optimallashtirishning ajoyib usuli hisoblanadi. Uzoq URL manzillarini boshqalar bilan bo'lishish qiyin, matn muharrirlari va elektron pochta tahrirlovchilarida uzilishlar bo'lishi mumkin, va URL manzil papkasining murakkab tuzilmalari sizning qidiruv tizimlariga sizning kontentingizning ahamiyati to'g'risida noto'g'ri signallarni yuborishi mumkin.

YYYY/MM/KG doimiy aloqa tuzilmasi

Agar sizning saytingizda ikkita URL manzili bo'lsa, qaysi biri maqolaga katta ahamiyat bergan deb o'ylaysiz?

  • 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. Qidiruv mexanizmi optimallashtirish (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. Qidiruv mexanizmi natijalari sahifasi (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.

Birinchi qadam - bu WordPress administratoridagi Sozlamalar> Permalinks -ni yangilash va doimiy havolangizni o'rnatish /% postname% /

WordPress sozlamalari havolasi

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 (Regex) buni qilish uchun. Oddiy ifoda naqsh izlaydi. Bunday holda, bizning muntazam ifodamiz:

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

Yuqoridagi ibora quyidagicha taqsimlanadi:

  • /\ d {4} yilni ko'rsatuvchi chiziq va 4 ta raqamni qidiradi
  • /\ d {2} chiziqni va oyni ifodalovchi 4 ta raqamni qidiradi
  • /\ d {2} chiziqni va kunni ifodalovchi 4 ta raqamni qidiradi
  • /( .*) URL oxiridagi hamma narsani siz yo'naltiradigan o'zgaruvchiga yozib oladi. Ushbu holatda:

https://martech.zone/$1

Ichkarida shunday ko'rinadi Matematik SEO reytingi plagin (bizning ro'yxatimizda sevimli WordPress plaginlari), just don’t forget to ensure the type is set to Regex ochiladigan ro'yxat bilan:

matematik seo yo'naltirishlari

Blog, toifa yoki toifa nomlari yoki boshqa shartlarni olib tashlash

Blog o'chirilmoqda – 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

Turkumni olib tashlash - O'chirish uchun kategoriya slug -dan (u sukut bo'yicha mavjud) dasturni joylashtiring Rank Math SEO plaginlari qaysi variant bor chiziq toifasi SEO sozlamalarida URL tuzilishidan> Ishoratlar:

Havolalardan matematik chiziqlar toifasi

Kategoriyalar o'chiriladi – 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

Ma'lumotni oshkor qilish: Men mijoz va sherigiman Tartib matni.

Siz nima deb o'ylaysiz?

Ushbu sayt spamni kamaytirish uchun Akismet-dan foydalanadi. Fikringiz ma'lumotlarining qanday ishlashini bilib oling.