• Resolved Blair Geddes

    (@primalspace)


    Like others, we’ve recently seen a spike in issues where lots of our client sites have large numbers of 404 URL errors in GSC, as explained here – https://www.seroundtable.com/google-search-console-404-error-report-1000-urls-36728.html

    We are looking to create a redirect rule to move any URL ending in //1000 to simply redirect to the same URL without that element and trailing slash.

    Attempt for source URL was this: ^(.*)//1000$

    And target URL was this: /$1/

    But it doesn’t hold the site URL within that redirect. What’s the correct entries for source + target URLs for the redirect rule here please?

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author John Godley

    (@johnny5)

    You can find details about regular expressions and how to test them here:

    https://redirection.me/support/redirect-regular-expressions/

    Thread Starter Blair Geddes

    (@primalspace)

    Thanks for the quick reply. We read that article in full before posting here, but can’t seem to get a rule to work for this spam URL requirement. How do you include the base URL in that specific URL rule?

    Plugin Author John Godley

    (@johnny5)

    Have you tested the expression using the tester tool referenced on the page? What is the full URL of one of these pages? Have you cleared any caching?

    What do you mean by the base URL?

    Thread Starter Blair Geddes

    (@primalspace)

    What is happening with the rule we added in the question here, is it’s stripping the site base URL. For example below:

    Bad link: https://url.com/page-name//1000

    URL it’s redirecting to: /page-name/

    Desired URL redirect: https://url.com/page-name/

    Plugin Author John Godley

    (@johnny5)

    The redirect will only do what you instruct it to do. If you put a relative path in the target then it will redirect you to a relative path. This should still work on the same site.

    If you can give a real URL then I can see for myself.

    Thread Starter Blair Geddes

    (@primalspace)

    Ok, what I’ve provided in initial post in this question is what we have in place, which isn’t working. It redirects without base URL included, as previous message. We can’t provide a URL in this forum, but will try to reach out to you separately with that if you need to see it in action.

    Plugin Author John Godley

    (@johnny5)

    You sent me a URL by email and it appears to be working just fine. However, your expression is grabbing the first part of the URL, which includes the leading /. Your target is also adding a / and so you end up with a double slash.

    Thread Starter Blair Geddes

    (@primalspace)

    Yes, the 404 links in GSC all have double slash in URL structure. Like the example we gave in previous reply – Bad link:?https://url.com/page-name//1000

    How do you edit the code in the rule, to work with // please? Simply adding another / into the rule, doesn’t work. Making this work for /1000 doesn’t help here. It needs to address the spam issue which always has //1000 at end of hundreds of URLs. Although perhaps we’ll keep this rule which works for single / too

    Plugin Author John Godley

    (@johnny5)

    This has nothing to do with the double slash at the end of the URL. Your expression is adding a double slash at the beginning. Either remove the first slash from the target, or modify your expression to not capture the first slash.

    As explained in the support page I don’t provide support for specific expressions. This is something you’ll need to use a regular expression tester for.

    Thread Starter Blair Geddes

    (@primalspace)

    If you mean change /$1/ to become $1/

    We tried that already before posting here, and it gives this message warning: Your target URL should be an absolute URL likehttps://domain.com/$1/or start with a slash/$1/.

    Can you provide the source URL and target URL code we need to add to make this work please?

    Plugin Author John Godley

    (@johnny5)

    It’s just a warning. It doesn’t stop you saving it.

    As mentioned, I don’t provide regular expressions. This is something outside the scope of the plugin.

    Thread Starter Blair Geddes

    (@primalspace)

    Ok, don’t follow why it is out of scope given it’s a plugin feature? I.e. REGEX redirect. But removing the slash from start of target does not resolve the issue. Same issue where base URL part is not in end URL that’s redirected to. Really, we thought you would be able to provide the exact data to add into the source and target URLs to create a solution. Or have your own post about this specific spam issue on your site, given it’s affected thousands of websites globally.

    Plugin Author John Godley

    (@johnny5)

    Regular expressions are a general function available everywhere and are not created for the plugin. The guide I referenced contains a lot of information, with examples, and links to other places. There are also YouTube videos and a great deal of resources available. I do not have the capacity to create expressions for people (as described on the support page, and on this page).

    Exactly what part of the redirect isn’t working? The URL you sent seems to be working fine.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Google Search Console 404 Error Report For /1000 URLs Spike’ is closed to new replies.