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
-
Add Content to Page or Create New Page?
We are doing some local SEO for our business which is in 10 cities. We have built a city page with unique content for each city and linked to a unique contact page with contact information unique for each city. The content on our existing page is fairly thin. 2/3 of it is the same amongst all pages as our services are the exact same from city to city so the description ad menu of our services. Then 1/3 of the content is unique to the city which is a stock photo and 1-2 paragraphs of text containing about 175 words. We have another chunk of content for each city which is probably 2-3 paragraphs but each paragraph will be short so probably in total 200 words in 1-3 paragraphs. The subject of the content is related to one of the most popular search queries that are location specific. For example, if we were a company that provided say, environmental remodeling services in city X, this second chunk of content might be about required building permits when doing remodeling in City X and how to get them, how much they cost. If the original content on the pre-existing landing page is already pretty thin, is the SEO effect going to most likely be better to add the content to the existing page or, even though it's less than 200 words, add the content to a separate page and cross link between the main city page and the city contact page.
Local Website Optimization | | SEO18051 -
Service Location links in footer and on the service page - spamming or good practice?
We are are a managed IT services business so we try and target people searching for IT support in a number of key areas. We have created individual location pages (11) to localise our service in these specific areas. We put these location links in the footer which went to the specified IT support pages respectively. Now we have created a general 'managed IT services' page and are thinking of linking to these specific pages on there as well as it makes sense to do it. Would having these 11 links in the footer as well as on the 'managed IT services' page be spamming? or would it be good practice? If this is spamming, which linking location should hold preference. Would appreciate the feedback
Local Website Optimization | | AndyL93
Thanks
Andy0 -
Do location pages boost the homepage?
Google has stated that businesses should spend time creating location pages for the various service areas that businesses operate in. What I want to know is, it is equally about boosting the relevance of the site as a whole, as well as ranking that individual page in the local area. Does Google take into account the fact that you have the location page and reward the homepage by favoring it more in that local area, or is it simply about ranking an individual page in each town/city?
Local Website Optimization | | OliverNeely2 -
Choosing the best domain for international website section
Hi, i made a question before but the answer not clarified me yet: https://moz.com/community/q/which-is-the-best-xx-or-com-xx-in-general-and-for-seo I mark as answered inadvertently. I want to know what you think about choosing ".es" or ".com.es" for create a section for Spain and redirect them from the homepage. Same for Mexico.
Local Website Optimization | | NachoRetta
I think that is not so important for SEO, but i am not completely sure about other factors.
Big marks like Toshiba use:
http://www.toshiba**.es**
http://www.toshiba**.com.mx** and Cocacola:
http://www.cocacola**.es**
http://www.coca-cola**.com.mx** ".es" for spain and ."com.mx" for mexico?0 -
How to create sites with powerful individual pages to achieve top results.
How to create sites with powerful individual pages to achieve top results . According to MOZ I need to have powerful individual pages to achieve top results my site has a 0 authority so for this reason I need to focus on powerful pages but how do I know if my pages are powerful or not.
Local Website Optimization | | A.V.S0 -
Sub domain for geo pages
Hello Group! I have been tossing the idea in my head of using sub domains for the geo pages for each of my clients. For example: one of my clients is a lawyer in a very competitive Atlanta market http://bestdefensega.com. Can I set his geo page to woodstock.bestdefensega.com? Is this a viable option? Will I get penalized? Thoughts or suggestions always appreciated! Thanks in Advance
Local Website Optimization | | underdogmike0 -
How to build backlinks to brand new foreign website?
I want to rank a website based on 3 german keywords. i see there is possibility for that because i didn't see optimised website in first results. The domain name is based on my main keyword. how to start building high authority links to my website. Can i place my anchor text backlinks on English high pr websites?
Local Website Optimization | | malekmz0 -
Multi Location business - Should I 301 redirect duplicate location pages or alternatively No Follow tag them ?
Hello All, I have a eCommerce site and we operate out of mulitple locations. We currently have individual location pages for these locations against each of our many categories. However on the flip slide , this create alot of duplicate content. All of our location pages whether unique or duplicated have a unique title Tag, H1, H2 tag , NAP and they all bring in the City Name . The content on the duplicated content also brings in the City name as well. We have been going through our categories and writing unique content for our most popular locations to help rank on local search. Currently I've been setting up 301 redirects for the locations in the categories with the duplicated content pointing back to the category page. I am wondering whether the increase in number of 301's will do more harm than having many duplicate location pages ?.. I am sure my site is affected by the panda algorithm penalty(on the duplicated content issues) as a couple of years ago , this didn't matter and we ranked top 3 for pretty much for every location but now we are ranking between 8 - 20th depending on keyword. An Alternative I thought, may be to instead of 301 those locations pages with duplicate content, is to put No Follow tags on them instead ?... What do you think ?. It's not economically viable to write unique content for every location on every category and these would not only take years but would cost us far to much money. Our Site is currently approx 10,000 pages Any thoughts on this greatly appreciated ? thanks Pete
Local Website Optimization | | PeteC120