Javascript, PhP and SEO Impact?
-
What are the Pro's and Con's of using Java Script and PHP in a site when factoring in SEO?
-
Alan's answer is spot on.
Avoid javaScript or carefully follow best-practices so Google can crawl all content without reading javaScript. Alan is exactly right when he said: never count on Google crawling through your JavaScript to find content, but also never count on being able to hide anything from Google via JavaScript.
Whether you use PHP or not is not directly relevant. PHP is executed server-side, so Google never sees your PHP code and doesn't care. What matters is whether your programmer writes PHP code that will generate search friendly HTML code, url structure, etc.
-
JavaScript is one of several technologies that offers severe limitations in search engines and their ability to properly see content, then just as important but often overlooked, properly and cleanly evaluate that content from an SEO perspective.
Specific considerations:
- Google does a "fair" job at discovering content passed through JavaScript (either on-page or at the code level)
- A "fair" job means it's hit and miss as to whether their system can actually find that content
- Whatever content the Google system CAN find via JavaScript is NOT necessarily able to be used to properly evaluate content intent, focus or relationship to other content
So - the best practices recommendation is if you want/need content to be found and properly evaluated by Google (or Bing) do NOT pass it through JavaScript.
And also, if you want to HIDE content from Google, don't assume you can successfully do so via JavaScript either.
As for PHP, its the most widely adopted and utilized web programming language out there. The language by itself is essentially SEO neutral. It's all in how a programmer utilized PHP that matters. In the hands of a programmer that either truly understands SEO or collaborates closely with an SEO expert (who also understands the limitations/pitfalls that can arise with "bad" (SEO-unfriendly) PHP coding, it's a great language.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
SEO Problem With My Pages ?
Hi everyone, I created a self-hosted custom PHP website the page is ( custom cosmetic boxes ), but it doesn't show up on Google. I tried to follow tutorials on the HubSpot, but even my site sucks. Please help me where I am wrong. Maybe the little thing is left unattended, which makes it void.
Web Design | | fbowable
Please help me.0 -
How Progressive Enhancement Will be Helpful for SEO?
We have bundle of webpages where we load the content dynamically with the help of Ajax. Since we, need to implement Ajax crawl scheme for making Google to read those Ajax dynamic content we planned to go with hashbang URL's (!#) by creating HTMl snapshots. But last week Google withdrawn their support on crawling the Ajax crawling scheme we are planning to go with progressive enhancement approach as stated by Google in a press release. So, I just want to know what is meant by progressive enhancement and how we can implement in the case of webpages where we load the content dynamically with the help of Ajax? Please advice me on this.
Web Design | | Prabhu.Sundar1 -
Is having copy above the fold still beneficial for SEO
Many sites nowadays are approaching a section based approach with copy further down the page. Is it still valid to keep copy above the fold now for SEO. Will it impact on SEO if you have to scroll down the page?
Web Design | | vortexuk0 -
Does using role="heading" instead of H1 in HTML code affects SEO?
Does using role="heading" instead of affect SEO? http://www.w3.org/WAI/GL/wiki/Headings_using_role%3Dheading
Web Design | | LNEseo0 -
Html 5 main and secondary navigation for SEO best performances
I am building a website which will have a main navigation related to the site and each link of the main navigation will have a secondary navigation. We do not want to use a megamenu style navigation. I will try to explain it with a example: Let's start with an example for a computer store "My PC Store", the Main Navigation would be: Desktop PC's Notebook & Tablets
Web Design | | netbuilder
Multimedia When clicking on the "Notebook & Tablets" the user is directed to the page domain.com/notebook-tablet.html and on this page the secondary navigation appears: Laptop Netbook Tablets / iPad I am confused on how I should organize the semantic navigation for best SEO performances and I need advice / suggestions. I thought about 2 different ways to do it but which one is more appropriate in terms of SEO? PROPOSITION A Home Page: <header> My PC Store <nav> Desktop PC's Notebook & Tablets Multimedia </nav> </header> Sub-Page (Notebook & Tablets): <nav>(or <aside>?) Desktop PC's Notebook & Tablets Multimedia </aside> </nav> <header> Notebook & Tablets <nav> Laptop Netbook Tablets / iPad </nav> </header> As you notice on the home page the Main Site Navigation is included in the <header>while it is not in the sub-pages. PROPOSITION B Home Page: <header> My PC Store <nav> Desktop PC's Notebook & Tablets Multimedia </nav> </header> Sub-Page (Notebook & Tablets): <header> Notebook & Tablets <nav> Desktop PC's Notebook & Tablets Multimedia </nav> # Notebook & Tablets * Laptop Netbook Tablets / iPad </header> The main navgation remains always in the <header>(home page / sub-pages) of all page. I need suggestions... How would you guys organize the nav ? </header> </header>0 -
What is Best Platform to Build Website - SEO in mind
Hello... I am going to be creating two new websites shortly that will need to be built with SEO in mind. These will not be e-commerce sites, but instead will be informational with a couple pages of content on each. One will be used to get people to input their contact info and that info will be sent to our call center where we will call them back from. The other site will be heavily used for graphics, but still needs to have room for content (seo purposes)... Can you guys please recommend what platform i should have these sites written on (and please remember I need to do this on whatever is the most SEO-Friendly)... Thanks
Web Design | | Prime850 -
Help choosing an E-Commerce platform for SEO, Product Videos and Usability today?
7 months ago I asked the same question.. I am reaching out to all of you What platforms do you hate? and want to meet the guys or girls that coded it in a dark ally way... and What platforms are good? I keep looking at the code of some sites and its shocking. No GA Async code, No canonical tags.. it goes on and on.. If you want to pitch to me and you are in the UK email me robert@thefurnituremarket.co.uk
Web Design | | robertrRSwalters0 -
Lazy Loading Content and SEO
I'v been seeing a lot of websites use a technique to present content to website visitors when the scroll down the page called "Lazy Loading". Does this hinder SEO and indexing since the content is not actually on the page until the user acts/requests it?
Web Design | | JusinDuff0