I am coding a responsive web site where if a mobile device is detected, the page will appear differently. For example the navigation links will appear differently on a mobile page, which will be accomplished using an if statement as shown in the simple example below. <?php if ($mobilePage == "No") { ?> <span class="regularSiteNavLinks"> <a href="electronics.htm">Electronics</a> <a href="home-garden.htm">Home and Garden</a> <a href="health-beauty.htm">Health and Beauty</a> </span> <?php } ?> <?php if ($mobilePage == "Yes") { ?> <span class="mobileSiteNavLinks"> <a href="electronics.htm">Electronics</a> <a href="home-garden.htm">Home and Garden</a> <a href="health-beauty.htm">Health and Beauty</a> </span> <?php } ?> PHP: Since the same navigation links are coded twice on the page, will Google consider this duplicate content? (and penalize the site regarding SEO). Or will the if statement (which will only allow the navigation links to be displayed on the web page once - not twice) prevent the above from being considered duplicate content? Thank you!
They're not coded twice on the page that gets sent to the browser. Your logic is run on the server so Google is oblivious to it.
Thank you, Sarah! That's what I figured, but I wanted confirmation as I am relatively new to programming. Thanks again!