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
-
Checking subdomains/ site structure of a website for International SEO
Dear Moz community, I am looking into two websites for a friend and we want to understand the following: What is the site structure as per the sub domains? e.g currently it is .com/en/ or .com/ru/ or .com/zh/ Using the crawl report, each page has a en or other language version. I take it this means that we have to create copy, meta titles and descriptions for each of the languages even if the page is the same but in a different language? To avoid duplication of content would you suggest canonical tags to be put in place? To check hreflang mark up, I couldn't find anything in the code which makes me thing a script is automatically translating this? This is the first time I have started to look at international SEO and want to understand what to look for in an audit of exisiting sites. Thank you,
Local Website Optimization | | TAT1000 -
One locations page, or multiple pages?
Hi, I represent a franchisor who does all marketing- including local seo- for our franchisees. I've read a lot about local SEO and understand the basics, but have some remaining questions. 1- If our typical territories are quite large and encompass more than one major city, should we create multiple location pages for the same franchise owner? I believe the answer should be yes from an SEO stand point, but the problem is that most of our franchisees naturally just have one business address (their home). Since PO boxes and virtual offices aren't the way to go, what's the best course of action? And when I say major cities, I'm really talking about major cities (and not just small towns/boroughs). Can they just use a friend's/relative's address? 2- There's a lot of info out there about "locations pages," but it's not really clear whether or not you should really just have ONE page for each location, or several pages with different content? For instance, it looks like a lot of businesses are creating just one, "home-page" looking landing page for their individual locations, with everything from services to testimonials on just that one page. Is this preferred over creating several different local pages for that one location? The latter is what we currently do. From the user stand-point, it looks like each franchise location has it's own "mini website" on our main website. For instance, a landing page optimized for the local business name, a local services page, a project/photo gallery page, local review page, etc. It seems like a lot less work just building one landing page for each location, but is the payoff the same? I'm torn between the two strategies- is it really worth the extra work (in terms of traffic + local ranking) to build out the individual pages for the one location? Thanks Moz Community!
Local Website Optimization | | kimberleymeloserpa0 -
How do I set up 2 businesses that work together but are ran seperately with two separate websites but similar content?
How do I set up these sites so that they will not be negatively affecting their SEO efforts? I have 2 businesses with the same owner. Business A manufactures nurse call systems and Business B installs them. They are run separately with two websites. The content is very similar because the business that installs them describes the different products on their website. These are the two sites: intercallsystems.com and nursecallny.com , My thought was on nursecallny.com when you click on the nav link "Nurse Call Systems" you would be directed to the intercell website. Would this be the best method? Thank you for your help!
Local Website Optimization | | renalynd270 -
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 -
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 -
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 -
Localize Homepage, or service pages?
Hi so I am curious if a homepage may carry the most link juice, then if you service an entire state, do you include the state name as a keyword in your homepage title to get noticed, or the company brand, resulting in adding service area pages to cater to unique each city that you service? I am just not sure if Google is smart enough to know you service a state? I have my local page with a service area, but is this all I need? So I would not need to add a state name. Like I build horse barns, pole barns, metal buildings, and indoor riding arenas. So I am curious if you would do a title tag like Colorado Builders - Barns, Buildings, and Arenas Or maybe Colorado at the end? Or not at all Thanks for any tips.
Local Website Optimization | | asbchris0 -
How slow can a website be, but still be ok for visitors and seo?
Hello to all, my site http://www.allspecialtybuildings.com is a barn construction site. Our visitors are usually local. I am worried about page speed. I have been using Google Page Insight, and Gtmetrix. Although I cannot figure out browser leveraging, I have a 79 / 93 google score and for gtmetrix 98/87 score. Load times vary between 2.13 secs to 2.54 secs What is acceptable? I want to make sure I get Google love for a decent page speed, but for me these times are great. Bad times are like 7 seconds and higher. I have thought about a CDN, yet I have read horror stories too. I have ZERO idea of how to use a CDN, or if I need it. I just want a fast site that is both user and Google speed friendly. So my question is, what is a slow speed for a website? Is under 3 seconds considered ok? or bad for seo? But any advice is greatly appreciated.
Local Website Optimization | | asbchris0