Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialOziel Perez
61,321 PointsDoes any PHP Output get indexed by search engines?
I'm working on a website that needs to be translated to Spanish. For this project I will be using PHP to fill in text on my pages. My translations (including English) will be stored in a separate php file and will get included at the top of the page, meaning that every element where text should go will serve as a placeholder for where the text will go. My question is: since my text is going to be on a separate php file, will search engines render out the whole page first and then read all the text that was placed in dynamically, or will it only read the code on the web page and not on the php included file? Hope that made sense. Help is much appreciated....
if you're curious what the website is, it's www.taxandbookpros.com, it's a 2 page website.
2 Answers
Tom Bedford
15,645 PointsYes, all of it. Search engines will read the page after it's been processed by the server.
PHP is a server side language, so each time the page is called, the server runs the PHP code and sends the output to the client that requested it - be it a user on a web browser or one of Google's robots.
Oziel Perez
61,321 PointsGreat! Thanks, I know that the server executes the PHP code before outputting. I just wasn't sure at what point did the search engines scan through the code, be it before or after processing