Mobile app version of vmapp.org
Login or Join
Carla537

: How to handle Partials in a Sitemap? Let's say I've got all of my pages laid out like root/page.php combined with root/content/page.php page.php includes: header.php footer.php sometemplate.php menu.php

@Carla537

Posted in: #Sitemap #SiteStructure #XmlSitemap

Let's say I've got all of my pages laid out like

root/page.php combined with root/content/page.php

page.php includes:


header.php
footer.php
sometemplate.php
menu.php
submenu.php
/content/page.php


This way the only thing generally in the /content/page.php is very basic html markup and the copy.

For my sitemap would I list www.root.com/page.php or www.root.com/content/page.php?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

1 Comments

Sorted by latest first Latest Oldest Best

 

@Radia820

You should index whatever the visitor is viewing and not internal by-parts of your template.

Files such as footer.php, header.php, nav.phpare commonly called using PHP Include, because of the nature of the way PHP includes work, the visitor doesn't see any of these files but rather a complete render of all parts, it is the final outcome that you should want to index.

Using good PHP practices your php template files should not be directly accessible, so even if you did include them in your sitemap, Google and other search engines would not index those pages, because the server should be returning a valid server-side response with either a 404 not found, or 403 forbidden.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme