2

I am, as a volunteer, taking care of our local YMCA websites (thereof refered to as [sub].domain where sub refers to different websites). For some reason, a few months ago google stopped indexing our websites. I have been trying to solve this ever since, but without any luck.

  • I (sometimes) cannot verify ownership: the requests always times out. Interestingly enough, it sometimes work. And sometimes not. I have not been able to spot any pattern; I added one website successfully (subdomain), but not the other (main domain)
  • Google seems not to be able to read robots.txt
    • I have tried accessing it through the browser, command line tools to inspect redirect chains, and other validator services, and all seems fine
    • Google validator says it cannot be read at the moment, and that it will use older version if acccessible; the tool shows that a crawler can access URLs I've tried out
    • Requests for pages indexing fail because it says robots.txt is not accessible
  • Google seems not to be able to load sitemap.xml
    • I have tried similarly as above all sorts of things, the search console shows 'general HTTP error'
  • It should be already obvious that no pages are indexed - nothing works - at least wrt. google, all other validators, and services seem to work fine.

It can be this problem is also on other websites living on the same server, I cannot really say because of the first issue. I got the verification done only on the site I gave a link to.

It's as if google was blocked by our server. Websites are running on self-hosted Synology station, via Apache (that somehow operates through Nginx). Unfortunately, I do not have much knowledge nor direct access to these.

The mentioned file contents: robots.txt

    User-agent: *
    Disallow: /wp-admin/
    Allow: /wp-admin/admin-ajax.php

sitemap.xml

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://wp.[domain]/wordpress/wp-content/plugins/google-sitemap-plugin/sitemap-index.xsl"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>http://wp.[domain]/wordpress/sitemap_1.xml</loc>
    <lastmod>2022-11-28T19:56:36+00:00</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://site1.[domain]/sitemap_2.xml</loc>
    <lastmod>2022-11-28T20:05:53+00:00</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://site2.[domain]/sitemap_3.xml</loc>
    <lastmod>2022-12-17T18:39:09+00:00</lastmod>
  </sitemap>
</sitemapindex>

sitemap_3.xml

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://site2.[domain]/wp-content/plugins/google-sitemap-plugin/sitemap.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>[url]</loc>
    <lastmod>2022-12-17T19:39:08+00:00</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>
  ...
</urlset>
4
  • It may help if you posted the contents of your sitemap and robots.txt files. If they are humungous, then snip out repetitive bits. And change the domain to example.com Commented Jan 2, 2023 at 3:53
  • I mean since I gave the URL everyone could access these files directly. Hope it is better now.
    – Jiří
    Commented Jan 2, 2023 at 15:13
  • I was not sure if you meant to give out your URL. Example.com is reserved for this purpose. The only thing that is different from my setup is that you haven't mentioned the sitemap(s) in robots.txt. I have no idea if this is mandatory for Google. Google can also give if it takes too long to fetch the file. Finally there are some answers here Commented Jan 2, 2023 at 23:02
  • Since I use WP plugin that advertises google compliance, I don't think it an issue. You enter the sitemap URL to the console manually anyway. And I cannot give url to sitemap in a static file - it is a multisite.
    – Jiří
    Commented Jan 4, 2023 at 10:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.