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 -
Why my website PA is more than DA?
I am seeing in 2 months that the page authority of my website is increasing more than the domain authority, is this fit my website? Here is my website link https://coinmasterspins.net/ Any expert please suggest what will i do better for my website? Thanks in Advance.
Local Website Optimization | | Virticar0 -
More pages on website better for SEO?
Hi all, Is creating more pages better for SEO? Of course the pages being valuable content. Is this because you want the user to spend as much time as possible on your site. A lot of my competitors websites seem to have more pages than mine and their domain authorities are higher, for example the services we provide are all on one page and for my competitors each services as its own page. Kind Regards, Aqib
Local Website Optimization | | SMCCoachHire0 -
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 -
Pages ranking outside of sales area
Hi there Moz Community, I work with a client (a car dealership), that mostly serves an area within 50-100 miles at most from their location. A previous SEO company had built a bunch of comparison pages on their website (i.e. 2016 Acura ILX vs. Mercedes-Benz C300). These pages perform well in their backyard in terms of engagement metrics like bounce rate, session duration, etc. However, they pull in traffic from all over the country and other countries as well. Because they really don't have much of an opportunity to sell someone a car across the country that a customer could easily buy at their local dealership, anyone from outside their primary marketing area typically bounces. So, it drags down their overall site metrics plus all of the metrics for these pages. I imagine searchers from outside their primary sales area are seeing their location and saying "whoah that's far and not what I'm looking for." I tried localizing the pages by putting their city name in the title tags, meta descriptions, and content, but that doesn't seem to really be getting rid of this traffic from areas too far away to sell a car to. My worry is that the high bounce rates, low time on site, and general irrelevancy of these pages to someone far away are going to affect them negatively. So, short of trying to localize the content on the page or just deleting these pages all together, I'm not quite sure where to go from here. Do you think that having these high bouncing pages will hurt them? Any suggestions would be welcomed. Thanks!
Local Website Optimization | | Make_Model1 -
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 -
Problem ranking page with a double name and an "&"
I have a client with a double name and a & like: Jones & Jones. I and using all in one SEO on a Wordpress site. Their home page is not ranking even though I have Jones, Jones & Jones and Jones and Jones listed in the keywords. Interestingly enough other pages where I did not list the home page rank when you do a serach for "Jones & Jones" I have not had this issue with other sites but have never had a name repeated and and & in between... any advice woild be appreciate.. I just signed up for a trial of MOZ...
Local Website Optimization | | ajgar0 -
Which internal page approach is better? Couponsite/Kohls OR Couponsite/Houston/Kohls
Google will use the user's location for a restaurant search but it doesn't look to me like it uses it for a national company like Kohls. Is there a way to determine that? Assume I have no physical local presence in Houston for answering the question. Assume also that the coupon I list is a national one that applies everywhere. It seems to me that a facebook post that uses the first one as a link is better because more people live outside of Houston than inside and will see it as relevant, AND I may list it for more than one city. But, for specificity perhaps it makes sense to have the second one as it may be more likely to show up in a Google search result by someone in Houston.. Your thoughts please? Thanks.
Local Website Optimization | | couponguy0