• Resolved darrenc66

    (@darrenc66)


    In WordPress general settings My site is set to:
    
    WordPress Address (URL) https://www.mywebsite.com
    Site Address (URL) https://www.mywebsite.com
    
    Permalink settings:
    
    Post name - https://www.mywebsite.com/sample-post/
    
    In Redirection "site" settings I selected "Don't set a preferred domain"
    
    I moved my site from Blogspot.com around 11 years ago. The blogspot permalinks were:
    www.mywebsite.com/yyyy/mm/my-post.html
    
    My current redirect for the old blogspot format is:
    
    source = ^/\d{4}/\d{2}/(.*).html$
    target = https://www.mywebsite.com/$1/
    
    I've used the official AMP plugin, AMP for WP, and AMP Ninja, but not for several years, and currently use the following redirects:
    
    source = ^/(.*?)/amp/$
    target = https://www.mywebsite.com/$1/
    
    source = ^/(.*?)/amp$
    target = https://www.mywebsite.com/$1/
    
    source = ^/(.*?)/\?wpamp$
    target = https://www.mywebsite.com/$1/
    
    source = ^/(.*?)/\?amp$
    target = https://www.mywebsite.com/$1/
    
    Along with those I have some redirects from old "deleted" posts to new post, and from tags to categories and categories to tags.
    
    In Google Search Console, indexing > pages, I have 3.84k pages not indexeed. 2,144 of those are "page with redirect." That's reduced from 5000+ over the last couple of years, but Google reports new problems every 3 - 4 days.
    
    I've changed the redirect several times over the year or so, most recently just a few days ago, and using the https://redirect.li/ checker I though I had finally cracked it, until Search Console updated and reported the same persistent errors.
    
    Those errors iclude, page with redirect:
    
    https://www.mywebsite.com/my-post
    https://www.mywebsite.comm/my-post//1000
    https://www.mywebsite.com/my-post/1000
    https://www.mywebsite.com/my-post//
    https://www.mywebsite.com/amp/?wpamp
    https://www.mywebsite.com/?p=12345
    
    In some cases https://www.mywebsite.com/my-post/ is simply https://www.mywebsite.com/my
    
    On click from Search Console, they all redirect to the canonical url.
    
    Before I try again, is there something about the redirects that is obvioulsly worong?
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author John Godley

    (@johnny5)

    There’s a lot of information there and I can’t realistically tell you if anything is wrong for a site for which I have no knowledge or context. It can take quite a long time for Google to update, so sometimes patience is all that is required. If not then the information provided by Google is the key to understanding their results – there may be other factors involved.

    Thread Starter darrenc66

    (@darrenc66)

    Thanks John, and understood. Is possible the redirects are conflicting with each other, causing the double trailing slash?

    Something I noticed in the Redirection log also is source url /my-post/amp/?wpamp – redirecting to target url /my-post/amp/

    Plugin Author John Godley

    (@johnny5)

    Is possible the redirects are conflicting with each other, causing the double trailing slash?

    It’s not really a thing that happens. You can use the information in Google to test your URLs (using https://redirect.li/) and see what happens. It should be reasonably obvious if a redirect is not doing what you want.

    Something I noticed in the Redirection log also is source url /my-post/amp/?wpamp – redirecting to target url /my-post/amp/

    Is that right or wrong?

    Thread Starter darrenc66

    (@darrenc66)

    Is that right or wrong?

    It looks wrong, like it should direct redirect to the canonical but it doesn’t.

    There are several examples. When I click on “View redirect” from the log the source is ^/(.*?)/\?wpamp$

    It’s only some what behave like this, others redirect straight to the canonical without jumping on the back of /amp/

    Plugin Author John Godley

    (@johnny5)

    You can use https://redirect.li to see what is happening with the redirect and adjust things as necessary.

    Thread Starter darrenc66

    (@darrenc66)

    Yes, will give it a go. I used that to test initially and everything looked ok. Thanks for your time John, really appreciate.

    Thread Starter darrenc66

    (@darrenc66)

    In direct.li my-post/amp/?wpamp redirects to my-post/amp/ (301) then to canonical (200)

    my-post/?wpamp redirects to canonical

    Plugin Author John Godley

    (@johnny5)

    I don’t think that will cause pages not to be indexed, but you can experiment using the available information.

    Thread Starter darrenc66

    (@darrenc66)

    Ok, many thanks John. Hope I havent wasted too much of your time ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Regex Help’ is closed to new replies.