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
-
Need suggestion: What is the best internal linking structure for our website to gain in SEO & UX too?
Hi all, We have 3 different editions of our product we are selling with 20 features. 1st edition & 2nd edition comes with 15 features in which 10 are common in each edition. 3rd edition comes with all 20 features. Now what's the best way to interlink and show the navigational menu to highlight 3 editions and features as well? Much appreciated if some one refer me a website with such structure. Thanks
Web Design | | vtmoz0 -
Moving servers which means moving ip address but using the same URL. Would it harm the website's SEO?
Hello everyone, The server (in-house) which we use to host our website is a bit old. We are using CDN77 for our static content. What if I move all our website to the CDN service? meaning I use their storage capability and just have our url point to the IP address they provide. Would that hurt our rankings?
Web Design | | Edgar-Cerecerez0 -
/index.php/ What is its purpose and does it hurt SEO?
Hello Moz Forum, I am still in the process of cleaning up the lack of attention to detail and betrayal set by our soon to be ex-SEO company. You can see a previous question I ask regarding betrayal SEO. I am analyzing every page on our website and i am noticing this /index.php/ in most of our URLs. We want to leave our expression engine cms and convert to wordpress. I have been reading about index.php but most of it is over my head for now. What does concern me is the "layman's" findings i am seeing through analytics. Our main domain has two URLs. one that ends in .com and the other ends in .com/index.php/ The one that ends in .com has a higher page rank than the ladder. And there are other internal pages with the same two variations. Can someone please explain to me what is /index.php/ ? what are the benefits of it? what are the cons? What will happen to my site once we move to wordpress? As always, your comments and suggestions are greatly appreciated.
Web Design | | CamiloSC0 -
Can white text over images hurt your SEO?
Hi everyone, I run a travel website that has about 30 pre-search city landing pages. In a redesign last year we added large "hero" images to the top of the page, and put our h1 headlines on top of them in white. The result is attractive, but I'm wondering if Google could be reading this page as "white text on white page", which is an obvious no-no, especially if it could seem that we're trying to hide text. Here's an example: http://www.eurocheapo.com/paris/ H1: Expert reviews of cheap hotels in Paris I should add that our SERPs for these city pages has dropped (for "Cheap hotels in X"), but it could obviously be related to other issues. Any advice would be appreciated. Many thanks! Tom
Web Design | | TomNYC0 -
Will updating our site from ASP .NET 3.5 to ASP .NET 4.0 negatively affect SEO?
I've checked out some of the other posts related to .NET upgrades, but none specifically address ASP .NET 4.0. I understand that there are many advantages to upgrading, but as with any change made to site code I want to be 110% positive that this upgrade will not affect how Google ranks my client's pages. Since the URL extension isn't changing (will remain .aspx), I'm thinking that there won't be much of an affect on SEO at all. In fact, I'm making the argument that the upgrade will only improve page rank. Anyone go through this upgrade and experience any immediate benefits or disadvantages? Thanks for your help!
Web Design | | FreightTEK0 -
SEO page length 4500+ words
I have read varying discussions on this... some say it is good or rather it does not really matter (as long as not stuffed with keywords) and some say more than 1000+ words is bad! I have a travel site and I want to add an historical page about the zone. It is very interesting (very organic, not written for SEO purposes as such). It adds flavor and details to a site that is really all about sales. Does anyone have an opinion whether this is detrimental to SEO or not?
Web Design | | Llanero0 -
SEO Issues From Image Hotlinking?
I have a client who is hotlinking their images from one of their domains. I'm assuming the images were originally stored on the first domain (let's call it SiteA.com) and when they were putting together SiteB.com, they decided to just link to the images directly on SiteA.com instead of moving the images to Site B. Essentially hotlinking. Site A is not using the images in any way and in essence is just a gateway for their other sites and in this case a storage for their images. It doesn't use those images at all, so it really doesn't get any benefits of the images being referenced since I read that Google sometimes counts that hotlinking as a "vote" for the original image. But again, since ite A doesn't use the images that are being hotlinked at all, there's no benefit for Site A. My concern is that it's affecting their SEO for Site B because it makes it look like Site B is simply scraping data by hotlinking those images from Site A. Their programmer suggested creating a virtual directory so that it "looked" like it was coming from Site B. My guess is that Google can see this, so then not only will it look like Site B is scaping/hotlinking images, but also trying to hide it which may send up red flags to Google. My suggesstion to them was to just upload the images correctly into their own images directory on Site B. They own the images, so there's not any copyright issue, but that if they want proper SEO credit for that content, it all needs to be housed on the correct server and not hotlinked. Am I correct in this or will the virtual directory serve just as well?
Web Design | | GeorgiaSEOServices1 -
I need to buy a website template with seo focus - any tip? what technology is better?
Due to lack of resources, my company usually buys website templates and we adjust it internally. So we can always be with new designs, spending less money. With all this changes of google panda recently, I will change my website again. Usually we buy then from templatemonster, but some templates are far away from seo standards. Do you have tips where to buy than? Should I search for a specific technology or layout? Is this JS Animated website a goog choice?
Web Design | | Naghirniac0