Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am using a database to store data such as articles, titles, meta and so on. Do I need to Have a separate page for each article so that my articles show up in the list when searched on Google?

Is is that Google can not crawl through the list of articles in the database and then give corresponding results? I am confused because i can see pages that are not connected to a database up in the list rather than pages that are retrieved from the database.

Anyone got any idea regarding this?

My scenario is this that , i have a tab on my navigation bar which leads to page that has a list of articles.

/home.php (home page) has a link on navigation tab to /articles.php - this is the page where there's a list of all articles and this is PHP generated (fetched from MySQL).

In this list again has href's to my articles but that is also just a single page with multiple id.

Example:

Article 1: www.example.com/articlenew/display.php?id=1

Article 2: www.example.com/articlenew/display.php?id=2

And so on... Will Google recognize my articles?

share|improve this question
add comment

migrated from stackoverflow.com Mar 21 '13 at 11:51

This question came from our site for professional and enthusiast programmers.

3 Answers

Google has no knowledge of the actual file structure of your web app and what is accessible to the public.

A news site, for example, will have hundreds of articles to view, but might only have one actual script: article.php.

Server-side directives might allow pretty canonical URLs like /category/283423-pretty-name to point to /article.php, and this is what Google sees.

Google cannot access your database layer, and retrieve articles that way. It only crawls your site and indexes pages that it can reach through regular link traversal.

In general, if you have content generated via JavaScript, it will not be indexed. This includes any links that can only be reached via a JavaScript event.

share|improve this answer
    
Thant you for the reply! So my scenario is this that , i have a tab on my navigation bar which leads to page that has a list of articles. www.example.com/Home.php (home page) has a link on navigation tab to www.example.com/articles.php - this is the page where there's a list of all articles and this is php generated (fetched from mysql), In this list again has href's to my articles but that is also just a single page with multiple id. example: Article 1: www.example.com/articlenew/display.php?id=1 Article 2: www.example.com/articlenew/display.php?id=2 and so on... Will google recognize? –  Arihant Mar 21 '13 at 2:31
    
As long as the pages all have unique URLs, and are reachable via hard anchor links, Google will be able to index them. –  Julian H. Lam Mar 21 '13 at 12:43
add comment

Visit the following link for specific information and guidelines on how Google crawls pages. http://support.google.com/webmasters/bin/answer.py?hl=en&answer=35769

Creating a sitemap is probably the way to go with dynamic pages(which is definitely how you should proceed). Without one, as already mentioned Google will default to simple link traversal, which unless every single article has a link pointing to it from somewhere on another page all your articles will not be crawled. But simply stated you do not need to make an actual web page for every article to get crawled. That would be extremely time consuming!

To answer your second question, as long as every single article you want crawled is listed on that page than it is highly likely Google will recognize them all. Even still, creating a sitemap is critical. Google is pretty good at recognizing dynamic pages on its own provided there are links, but crawling a page is completely different than understanding what it is crawling. A sitemap, along with proper Google tags on each page will ensure each article will be crawled and indexed optimally.

share|improve this answer
add comment

This is a case where rewrite rules would be beneficial. The SEO friendly way to do this would be to have URLs that are distinctive before the query string.

You can use rewrite rules to attain this. Look into mod rewrite for Apache (there are mechanisms for IIS as well).

Essentially a rewrite rule will take a URL that looks like this to a user (or a search engine):

www.example.com/articlenew/1 

but will appear like so to your server and to php (ie. it will be rewritten):

www.example.com/articlenew/display.php?id=1

Your rewrite rule would look something like this:

RewriteRule  ^/articlenew/(.*)  /articlenew/display.php?id=$1   [L]

You might also need to enable the module and add more directives to configure it correctly. I hope this points you in the right direction.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.