Reputation: 7906
I am developing pages in php dynamically i.e data gets filled up from mysql DB. how do i assign a proper meta data and description for these dynamic pages so that google recognises it properly.
What needs to be passed in page so that google takes description properly. when i search a page in google. it takes the data in page as description not description tag contents
Upvotes: 0
Views: 1547
Reputation:
It depends on what you are using to build your site. Wordpress, for instance, doesn't come with meta description functionality by default. You would need to use a plugin.
Google will use your description only if it contains the keyword been searched for, and if it confirms that the meta description supplied accurately describes the content of the page.
This article might help: How to specify how your site looks in the search engines
Upvotes: 1
Reputation: 2636
<meta name="description" content="<?php echo $your_meta_description ?>" />
Upvotes: 2