Hello Hasanalkhaled,
Thanks for reaching out.
You mentioned that the Google Search Console is rejecting your sitemap. Can you share a screenshot of the notification you get when it is rejected? You can use any image-sharing service like https://pasteboard.co/, https://snag.gy/, https://imgur.com/, https://snipboard.io/, or even upload the screenshot to your own website. Once you upload it to an image-sharing service, please share the link to the image here.
Can you also let us know what you are trying to achieve with those two code snippets?
Hi Maybellyne,
Thanks for your response. I was getting noindex error earlier. Now getting redirect error. Screenshot – https://snipboard.io/t7SMgO.jpg
While searching for noindex resolve issue, one article suggested that yoast puts noindex when homepage has searchbox. therefore added the second function to fix that.
@hasanalkhaled Thanks for your reply.
We checked on the site and confirmed that the robots meta tag was set to index in the source code, and that no other noindex tag was being output via X-robots, and that your robots.txt file was in no way preventing Google from crawling and indexing.
Also, we checked in a Google search here and confirmed that the site is being indexed. Additionally, we don’t see any type of redirect issue occurring on the homepage as well, and that it is returning a 200 status code as expected:
cbailey$ curl -I https://baibai365.com/
HTTP/1.1 200 OK
Connection: Keep-Alive
X-Powered-By: PHP/8.0.21
Content-Type: text/html; charset=UTF-8
Link: <https://baibai365.com/wp-json/>; rel="https://api.w.org/"
Link: <https://baibai365.com/wp-json/wp/v2/pages/297>; rel="alternate"; type="application/json"
Link: <https://baibai365.com/>; rel=shortlink
Etag: "27277-1660497562;;;"
X-LiteSpeed-Cache: hit
Date: Wed, 17 Aug 2022 18:33:10 GMT
Server: LiteSpeed
Vary: User-Agent
Alt-Svc: quic=":443"; ma=2592000; v="43,46", h3-Q043=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-25=":443"; ma=2592000, h3-27=":443"; ma=2592000
If you remove and resubmit your site’s sitemap in Google Search Console, do the errors resolve?
hi devnihil, thanks for your response and effort. I appreciate it.