: 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
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?
More posts by @Carla537
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.