Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bcworkz

    (@bcworkz)

    Ideally you’d identify the referring sources of such links and correct the sources so Google wouldn’t be able to even find such URLs. Your Google Search Console should be able to help you identify the referring sources if you don’t already know.

    To prevent such links from going 404, you could setup a RedirectMatch directive in .htaccess that strips off any trailing 12 digit URL elements. Be sure to include the preceding / in the matching regexp so that similar portions of page slugs do not get matched. Add it back to the end of the captured portion of the URL, otherwise WP will cause another redirect. Something like:
    RedirectMatch 302 "(.*)/[0-9]{12}/?$" "https://elferteile-seifert.de$1/"
    (untested)

    Thread Starter bigman1123

    (@bigman1123)

    Thank you for your reply.
    But I am a little not sure about this sentence.
    “Your Google Search Console should be able to help you identify the referring sources if you don’t already know.”

    And I have 5000 products in my shop and I have changed permalink in the setting tab several days ago. Is there any possibility if google didn’t update yet what I had changed in my shop, because there are many products.
    thank you.

    Moderator bcworkz

    (@bcworkz)

    If the search console is reporting 404 errors from your site, there’s normally some way to learn of the referring page that had the link that went 404. It’s not always available though. You’ll have to poke around some in search console to find the referring page, if one is even available. I can’t give you a step by step right now because my search console currently doesn’t have any such errors.

    If you intentionally changed your permalink structure, it’s a moot point anyway. There wouldn’t be anything to fix on the referring page. To ensure the old links still lead to proper content, you should add redirect links in .htaccess to go from old to new permalinks. Similar to my earlier example, except if the change is permanent, return a 301 status instead of 302.

    It can take a good long while for Google to update the links in its DB. I’ve heard removing and resubmitting your sitemap can expedite the updating process. YMMV. If you don’t yet have a sitemap, a number of the SEO plugins in the WP repository can generate one automatically. A few might even submit it to Google if supplied with an API key. Fair warning: getting API keys out of Google can be very confusing and frustrating if you’ve little experience doing so. I recommend just submitting manually through the search console UI.

    Thread Starter bigman1123

    (@bigman1123)

    thank you your reply
    so what I can do at this moment, is installing seo plugin and wait for google update their database?

    Moderator bcworkz

    (@bcworkz)

    You could do nothing and wait. It’ll eventually sort itself out. It could take weeks or even months, depending on your site’s popularity.

    What I’d do in such a situation is
    1. Setup a dynamically generated sitemap through one of the SEO plugins if you don’t already have one.

    2. Submit said sitemap through Google Search Console. Not sure this will help, but it’s easy to do once you have a sitemap. Can’t hurt.

    3. Setup a 301 redirect in .htaccess to go from old to new links. IMO this is most important.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘I can’t access my products from google’ is closed to new replies.