-1

My objective is to generate multiple (about 100+ different) indexable html pages with different tags and content based on URL string, using only 1 or 2 php scripts.

as described below, i am using rewrite rules(because the actual pages doesn't exist but they are generated when a particular URL is accessed ,the urls itself are manually composed and fed to google in a sitemap.) and PHP includes with variables to generate different tags.

It's all fine (pages render properly with right meta/title/content) when i access them through browser but the same is not indexed by google!, it just indexed the URL string like "site.com/this/pageis/generated/onacess" because i put it in sitemap but it doesn't show anything else (meta description/title) of the page in the search results!., that shows a difference in manually accessing the page by browser and google bot access.need your help in understanding what i am missing.

I am expecting the bot to run the script to index my 'meta/title/description tags and the static tables' but that is not happening.

is it something to do with nested php includes? kindly help me understand what i am missing here.

here is my rewrite rule:

RewriteRule ^(.*).html$ /index.php [L]

contents of "index.php" :

<html>

<head>
  <?php include 'head.php' ?>
</head>

<body>
</body>

</html>

contents of "head.php":

  

<title> this title is not indexed
</title>
<meta name="description" content="Expecting this <?php $var $also ?> 
the content to be indexed and appear in the google search under the site_url link but its not showing">

google indexes this page but not showing the 'meta description/tilte " in the search results. it just shows the sitename/url no text below the link, why so. kindly let me know if anything is not clear.

3
  • 1
    I think it just takes time before Google discovers your site. Have you signed up for a Google Search Console account yet? There are features in it that let you submit your site for immediate indexing, as well as fetch as Googlebot so you can see what Google sees when crawling your site. See google.com/intl/en/webmasters Nov 24, 2016 at 3:05
  • Of course it executes the script. The script is executed by the server whenever there's a request for the URL, the client has nothing to do with it.
    – Barmar
    Nov 24, 2016 at 3:16
  • @rodrigo-silveira page gets indexed but not shown properly in google search results. it is not showing the "description" under my indexed page in the search result. google just shows the indexed URL but no text under it.
    – Revo
    Nov 25, 2016 at 5:27

1 Answer 1

1

Google does not always read your <meta> tags. Here is an article about that from moz.com. This has been the case for quite some time now.

7
  • Hi @chris g this doesn't appear to be the case here. because it's all fine if i add a plain .html file with meta tags in it unlike the way i described earlier.
    – Revo
    Nov 26, 2016 at 5:34
  • 1
    That seems strange to me. Google won't have any idea that there's an include involved, it will see anything you send out as one page. Have you tried using the webmaster tools to see what google is seeing?
    – chris g
    Nov 26, 2016 at 5:44
  • yes @chris, i have indeed submitted my sitemap through webmaster tools.
    – Revo
    Nov 26, 2016 at 6:09
  • my meta tags are generated on the fly based on the URL accessed something like this " <meta content=" you are accessing <?php $some and $thing > " > edited my Question for better clarity. Thank you so much for helping.
    – Revo
    Nov 26, 2016 at 6:12
  • Hi @chris g could you help me
    – Revo
    Nov 28, 2016 at 16:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.