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
-
Rebranding with the same website
Hello, I like to rebrand my site for the same URL - How can i do this?
Local Website Optimization | | signsny
Example: My site URL is www.signsny.com and i used "SignsNY" as brand name and citations and after the website redesign, i decide to go with "Signs NY" so i change the citations and pick the word as Signs NY to use but in google i lost the site links and knowledge graph on **Signs NY **keyword.......... Can you suggest me what to do and how to change the things for better results? Thanks,
Abie0 -
Seeking advise about my new landing pages for different cites
I have just created 6 new location landing pages for my Dallas insurance agency. Each one is for a different city, but I have a feeling I did it wrong 😞 Because my site is rather large, I put two different lines of insurance on each page. Homeowners insurance and business insurance. Now I'm wondering if I should of done 12 different pages? i.e **1 city + 1 product = 1 page ** Here's one of the new pages: http://thumannagency.com/personal-insurance/frisco-insurance I'm having a guess here, but would it be better if the Navigation was; thumannagency.com/personal-insurance/frisco thumannagency.com/business-insurance/frisco ??? Thank you so much in advance!!
Local Website Optimization | | MissThumann0 -
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 -
I can't get my page to rank. What am I doing wrong?
I'm new to this forum and this is my first question. So if I'm not supposed to ask this type of question, please forgive me. I'm trying my best to get http://www.westcoastflenterprises.com/#!roofing/bbb1e to rank on the first page in Google for "roofing contractors" in the following SW Florida cities: "Naples, Bonita Springs, and Fort Myers." Our company has a physical address in Fort Myers only so I understand it's going to be harder to get it to rank for Naples and Bonita Springs. But I can't even get this page to rank well for "roofing contractors in Fort Myers." The page authority is 25 and our domain authority is 27. Our home page authority is 39. Our primary category in Google is building restoration & preservation. But we have divisions in our company: Roofing Concrete Ornamental metals I would love it if our roofing page could rank higher than the third page, which is where it currently sits. I worked really hard to get each of our roofing-material manufacturers to link directly to our roofing page, not the home page. My hope is that you can help me because I'm really discouraged. Thanks in advance.
Local Website Optimization | | Jason_Taylor0 -
What to do with localised landing pages on listings website - Canonical question
Hi Run a pet listings website and we had tonnes of duplicate content that we have resolved. But not sure what to do with the localised landing pages. We have everything pointing back back to the main listings URL http://www.dogscatsandpets.co.uk/for-sale-stud-and-adoption/ but haven't pointed the URLs that show pets for specific towns and cities eg http://www.dogscatsandpets.co.uk/for-sale/dogs-and-puppies/in-city-of-london/ back to the main url. Obviously this is giving us duplicate content issues, but these pages do rank in local search and drive traffic into the site. So my question is should we canonicalise the local pages back to the main url and if we do will this mean our local landing pages will no longer rank? Is there any alternatives?
Local Website Optimization | | dogscatsandpets0 -
Top Pages analysis showing wordpress site pages when it was in a subdirectlry
My word press site used to be at morganlindsayphotography.com/Wedding I moved my site from /Wedding to the root domain three years ago where it is currently at www.morganlindsayphotography.com. Top pages in the open site analysis are still finding ONLY my old pages, titles and posts that were in the /Wedding - which are not even on my site anymore. http://www.morganlindsayphotography.com/Wedding/ http://www.morganlindsayphotography.com/Wedding/2012/11/04/a-new-product-addition-to-weddings/ http://www.morganlindsayphotography.com/Wedding/2012/06/22/brittany-reis-jason-mcclaflin-tiffin-ohio-wedding/ http://www.morganlindsayphotography.com/Wedding/2013/10/06/andy-mallory-cleveland-ohio-engagement/ http://www.morganlindsayphotography.com/Wedding/category/weddings/ Does anyone know why this could be happening?
Local Website Optimization | | morganlindsaycole0 -
Targeting different cities for my service - Geo landing pages
I am breaking my head trying to figure out the best way around this... so we have an hvac company located in nyc. We want to also target all the different boroughs. We have a bunch of different major keywords hvac repair + location hvac service + location along with keywords such as air conditioning repair + location, heating service + location , and so on..... Should each borough + keyword have its own page? Or should we just have one page called brooklyn and in that page target all the different keywords like hvac, air conditining, and heating ? Also does it matter how we have it laid out? Domaim/hvac-repair-brooklyn or should I add domain/service-area/hvac. ..... Some of my competitors have the same content written on each borough page just moved around a little with different city names, how are they ranking so well? Isn't that duplicate? Would love to hear from some people with success in this local area. Thanks!
Local Website Optimization | | interstate0 -
Has anyone had any success buying a local domain website, getting it on first page and then selling it to a local business? I have found some good domains that this might work for but I am wondering if anybody has tried this before.
I would like to buy a local domain like scottsdalepaintingcontractor.com and then seo it to first page before I sell it. Has anybody tried such strategy?
Local Website Optimization | | BWoods3