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
-
Help with error: Not Found The requested URL /java/backlinker.php was not found on this server.
Hi all, We got this error for almost a month now. Until now we were outsourcing the webdesign and optimization, and now we are doing it in house, and the previous company did not gave us all the information we should know. And we've been trying to find this error and fix it with no result. Have you encounter this issue before? Did anyone found or knows a solution? Also would this affect our website in terms of SEO and in general. Would be very grateful to hear from you. Many thanks. Here is what appears on the bottom of the site( www.manvanlondon.co.uk) Not Found The requested URL /java/backlinker.php was not found on this server. <address>Apache/2.4.7 (Ubuntu) Server at 01adserver.com Port 80</address> <address> </address> <address> </address>
Web Design | | monicapopa0 -
Should I Use An Animated Javascript Responsive Site
Hi, hope someone might be able to help me with this. I am setting my son up with a website for his small painting and decorating company. However, I am a wordpress stalwart and he has seen a theme which is a javascript animated responsive theme from template monster. Its not my choice just he is adamant that he wants it. However, I am slightly concerned that Google cannot index as well with these kind of sites as they would with a standard HTML site. I would be grateful if someone could confirm if they can be indexed etc. The content appears in what I can only describe as lightboxes. Thanks
Web Design | | denismilton0 -
Does DNS location affect international SEO?
Hi All Smart SEOmozers! I have another dumb question =] I have almost no knowledge on how DNS works and all the website background work. I understand that DNS is the server that translates a domain name to the IP address. Furthermore, I also know that IP Address location or web host location plays a small factor in international SEO. Webhosts usually provide the DNS service as well but for this case ABC Company uses a different domain service, diferent DNS service and different webhost service so things get complicated. So the question, does the location of DNS service we use affect International SEO like how the location of the webhost does. Thank you in advance for your help!
Web Design | | TommyTan0 -
SEO while designing the website and continuous SEO
What's the difference between SEO while designing/developing a website (ie, setting up a website so it is crawled by search engines) and the SEO that people talk about that needs to be viewed analyzed and changed all the time? I don't have a ton of money to spend on SEO right now but I do want to make sure my website is set up by an SEO expert (if possible) so when I do have money to spend on SEOthe website is set up properly to work with more advanced forms of SEO. I guess I don't understand where you can draw the line (if forced due to money constraints) between SEO in the beginning and continued SEO. What do I need to look for with SEO and the design of my website. How do I get some type of SEO without breaking the bank??
Web Design | | CapitolShine0 -
Site Activity, SEO, and behind login
I have a site that provides online education and as such, most of the user activity happens behind a login. This has me thinking about potential SEO impacts with a few questions that maybe someone could lend some light on: How important is activity (above just search activity) to the search engines Would it help to enter these pages, even though they're behind a login, into GA as we have with the front-end of the site Does a subdomain make a difference (right now we implement the course as a subdomain of the main site Lastly, as I was looking at compete.com, I am wondering how they get these use statistics?
Web Design | | uwaim20120 -
What is the best SEO friendly CMS platform?
Would like to build some content sites and would appreciate some guidance on what you believe to be the most SEO friendly CMS platform. I'm also hoping to find something that doesn't require much HTML and is pretty easy to jump into.
Web Design | | EdStaton0 -
What are the SEO best practices for infinite scrolling?
Is infinite scrolling bad for SEO? Is there a way to implement infinite scrolling without hurting a site's SEO?
Web Design | | BostonWright0 -
Seo for flash home page?
I have a client who insists their home page be a single graphic image of their logo with php menus linking to all of the other pages up top. This appears to me to be an seo nightmare. They seem to be unwilling to have anything to do with changing the appearance and want to rely on seo for "all the other pages" on the site. What's an SEO to do in this situation? Is it possible to have a flash image that lands on a "homepage" for google to crawl, rather than a single image? What's the best seo approach here?
Web Design | | peaceland0