WordPress: Retire ak redireksyon YYYY / MM / DD Permalink Estrikti ak Regex ak Rank SEO Matematik

Redireksyon YYYY / MM / DD Regex WordPress Rank Matematik SEO

Senplifye estrikti URL ou a se yon bon fason pou optimize sit ou a pou yon kantite rezon. URL long yo difisil pou pataje ak lòt moun, yo ka jwenn koupe nan editè tèks ak editè imèl, ak estrikti konplèks URL katab ka voye siyal yo mal nan motè rechèch sou enpòtans ki genyen nan kontni ou.

AAAA / MM / DD Permalink Estrikti

Si sit ou a te gen de URL, ki youn ou ta panse te bay atik la ki gen pi gwo enpòtans?

  • 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. Search engine Optimizasyon (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. Paj Rezilta Search Engine (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.

Premye etap la pran se mete ajou Anviwònman> Permalinks nan WordPress admin ak jis fè permalink ou an /% postname% /

Anviwònman 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 (Regex) fè sa. Yon ekspresyon regilye sanble pou yon modèl. Nan ka sa a, ekspresyon regilye nou an se:

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

Ekspresyon ki anwo a kraze jan sa a:

  • / \ d {4} sanble pou yon koupe ak 4 chif nimerik ki reprezante ane a
  • / \ d {2} sanble pou yon koupe ak 4 chif nimerik ki reprezante mwa a
  • / \ d {2} sanble pou yon koupe ak 4 chif nimerik ki reprezante jou a
  • /(.*) kaptire tou sa ki nan fen URL la nan yon varyab ke ou ka redireksyon nan. Nan ka sa:

https://martech.zone/$1

Sa a se ki jan li sanble nan la Rank Matematik SEO Plugin (ki nan lis kòm youn nan nou grefon WordPress pi renmen yo), just don’t forget to ensure the type is set to Regex ak deroulan an:

ran matematik SEO redireksyon

Retire Blog, Kategori, oswa Non Kategori oswa Lòt Regleman

Retire Blog – 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

Retire Kategori - Pou retire kategori soti nan paresseux ou a (ki gen la pa default) deplwaye Rank matematik SEO Plugin ki gen yon opsyon pou teren kategori soti nan estrikti URL la nan anviwònman SEO yo> Lyen:

Ran Kategori Strip Matematik ki soti nan Lyen

Retire Kategori – 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

Divilgasyon: Mwen se yon kliyan ak afilye nan Ran Matematik.

Ki sa ou panse?

Sit sa a sèvi ak Akismet diminye Spam. Aprann kijan kòmantè ou a trete.