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
-
I have followed all the steps in google speed ranking on how to increase my website http://briefwatch.com/ speed but no good result
My website http://briefwatch.com/ has a very low-speed score on google page speed and I followed all the steps given to me still my website speed doesn't increase
Local Website Optimization | | Briefwatch0 -
Matching page for keyword doesn't show in search
Hello! I'm having an issue with my website Rooms Index, the website is in Hebrew so I'll provide examples in English for better understandings. When I'm searching Rooms by Hour in Haifa, google doesn't show the intended category page which is this, instead it shows my homepage in the results, this happens only for certain areas, while other areas are working well such as Tel aviv. For example if I searched day use in Las Vegas it'd show me the Las Vegas page dayuse.com/las-vegas, but searching for Brooklyn I'd only see dayuse.com. the pages are indexed and I can find them if I search site:roomsindex.co.il what could cause such problem?
Local Website Optimization | | AviramAdar0 -
Location Pages
Hi all, Business who has 2 locations.. They have 2 separate pages for their locations https://www.jacobsallen.co.uk/contact-us/jacobs-allen-bury-st-edmunds/ https://www.jacobsallen.co.uk/contact-us/jacobs-allen-haverhill/ But the location and address details also appear on https://www.jacobsallen.co.uk/contact-us/ and the home page. Is this going to be hurting their local SEO? In my opinion yes and the address info should just be on the 2 location pages. Thanks in advance
Local Website Optimization | | LMW0 -
My pages are absolutely plummeting. HELP!
Hi all, Several of my pages have absolutely tanked in the past fortnight, and I've no idea why. One of them, according to Moz, has a Page Optimisation Score of 96, and it's dropped from 10th to 20th. Our DA is lower than our competitors, but still, that's a substantial drop. Sadly, this has been replicated across the site. Any suggestions? Cheers, Rhys
Local Website Optimization | | SwanseaMedicine0 -
Site Audit: Indexed Pages Issue
Over the last couple of months I've been working through some issues with a client. One of my starting points was doing a site Audit. I'm following a post written by Geoff Kenyon https://moz.com/blog/technical-site-audit-for-2015 . One of the main issues of the site audit seems to be that when I run a "site:domain.com" query in Google my homepage isn't the first page listed in fact it isn't listed in this search when I go through all of the listings. I understand that it isn't required to have your homepage listed first when running this type of query, but I would prefer it. Here are some things I've done I ran another query "info:homepage.com" and the home page is indexed by Google. When I run a branded search for the company name the home page does come up first. The current page that is showing up first in the "site:domain.com" listing is my blog index page. Several months back I redirected the index.php page to the root of the domain. Not sure if this is helping or hurting. In the sitemap I removed the index.php and left only the root domain as the page to index. Also all interior links are sent to the root, index.php has been eliminated from all internal links everything links to root The main site navigation does not refer to the "Home" page, but instead my logo is the link to the Home page. Should I noindex my blog/index.php page? This page is only a compilation of posts and does not have any original content instead it actually throws up duplicate content warnings. Any help would be much appreciated. I apologize if this is a silly question, but I'm getting frustrated/ annoyed at the whole situation.
Local Website Optimization | | SEO_Matt0 -
What more can be done to get Google to change the landing pages it uses for certain search terms?
For one of my SEO campaigns, Google is using the website's home page as the landing page for the majority of search terms being tracked. The website splits its products by region and so we want specific region pages to rank for search terms related to that region, rather than the home page. We have optimised each regional page to a reasonably high standard and we have ensured that there is a good amount of internal linking and sign-posting to those region pages, however, Google is still using the home page. The only complication is that for the first few months there were canonical tags on these pages to the home page. These were removed around 3 months ago and we've checked that the region pages are indexed properly. Is there anything we are missing? Has anyone had any success in getting Google to change its landing pages?
Local Website Optimization | | ClickHub-Harry0 -
Multi-Country Multi-Language content website
Hi Community! I'm starting a website that is going to have content from various countries and in several languages. What is the best URL structure in this case? I was thinking of doing something like: english name of the plant, content in english, content for USA:
Local Website Optimization | | phiber
www.flowerpedia.com/flowers/red-roses spanish name of the plant, content in spanish, content for MX:
mx.flowerpedia.com/es/rosas/rosas-rojas english name of the plant, content in english, content for MX:
mx.flowerpedia.com/roses/red-roses
this content is not the same as flowerpedia/flowers/red-roses Content for Mexico would not exist in languages other than english and spanish. So for example:
mx.flowerpedia.com/jp/flowers/red-roses would not exist and it would redirect
to the english version:
mx.flowerpedia.com/flowers/red-roses What would be the best URL structure in this case?0 -
How Best to do implement a Branch Locator for a Website with invididual location category pages
Hi All, We have an ecommerce Website with multiple locations for our stores and we currently display separate location specific pages for the different categories and sub categories. This has helped us previously to rank well for local search in each of the areas we have a store but over the last few months since humingbird, our local rankings on some things have dip a little . We want to implement a branch locator of some description to improve the user experience. From looking at other websites with branch locators, they tend to a separate button/page with which you can search for a branch etc. However, they don't have location specific pages. My query is should I do it so if a user comes in on a specific category location page and follows it through to product page , then to have a tab on the product page displaying the local branch from which he can come in. My thinking here is that , is that it would help confirm my local citations and help improve local rankings. Or Should the local branch be displayed on the local category pages instead or as well ?. If a user comes in from the homepage or not on a specific location page, then the branch locator will allow them to search for a specific branch. Should I also put in a branch locator as a separate page or can It be in more places. I don't want to damage anything which may have an effect on rankings due to citations and NAP on the location specific pages. Any advice or good examples to look at would be greatly appreciated thanks Sarah.
Local Website Optimization | | SarahCollins1