×

Please Login or Register to continue.

1
(238 Views)

Hey Community members

I registered the sitemap in the search console and after a few days I got the Discovered - currently not indexed error.

sitemap.php

<?php 
require_once('includes/init.php');

$musics = $conn->query('SELECT id, slug FROM musics WHERE id ORDER BY date DESC');           

$base_url = "https://www.muziksara.ir/music?id=";

header("Content-Type: application/xml; charset=utf-8");

echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL; 

echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . PHP_EOL;

 while($row = $musics->fetch()){

 echo '<url>' . PHP_EOL;
 echo '<loc>'.$base_url. $row["id"] . '/' . $row["slug"] .'</loc>' . PHP_EOL;
 echo '<changefreq>daily</changefreq>' . PHP_EOL;
 echo '</url>' . PHP_EOL;
}

echo '</urlset>' . PHP_EOL;

?>

.htaccess

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.muziksara\.ir$ [NC]
RewriteRule ^(.*)$ https://www.muziksara.ir/$1 [L,R=301]
RewriteRule ^sitemap.xml/?$ sitemap.php
RewriteRule ^post-sitemap.xml/?$ post-sitemap.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
ErrorDocument 404 https://www.muziksara.ir/404

 

(170 Points)
in PHP

Share

2 Answers
(3.4K Points)
1

According to your sitemap https://www.muziksara.ir/sitemap.xml  your web links are indexed in the google search engine. There is no issue in the sitemap. The indexing process can be long because it depends on your content and search engines. 

Kindly have patience and check after sometimes. Kindly publish more content and make your website more popular. Use SEO techniques for better results. 

Many pages are not indexed but some pages are indexed of your site on the Google search engine that means your sitemap is working well but you will need to wait. Now, the process will depend on the Search engine algorithm.  

 


Comment

(9.3K Points)
(edited)
2

I can check that your sitemap is working cool but if you are getting Discovered - currently not indexed error.

This status means Google has crawled the URLs and determined they should not be indexed nor displayed in search results. It doesn't necessarily mean that your page has errors, rather it has to do with the quality of its content. 

Check the troubleshooting steps below to resolve the issue:

  1. Confirm that the page can be indexed by Google by clicking Test Live URL in Google's URL Inspection Tool. Learn More
  2. Make sure to organize your page's content and divide it into categories/sections with unique text that doesn't exist on other pages. Duplicate content (or very similar content) appearing on different pages of your site may prevent them from being indexed. 
  3. See that your subpages incorporate your keywords organically and have a visible connection to them. 

Kindly focus on these steps. 

You can check more here -

https://support.google.com/webmasters/answer/7440203


Comment

Related Questions :-

Featured Items:-


Certificate system in PHP website | PHP scripts

$22



Home Credito loan finance management multipurpose system in PHP

$98



Result management system with Marksheet in PHP website | PHP Scripts

$39




Your Answer

You can post your answer after login..