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
-
Proper SEO structure for Franchise/ Franchisee websites
Hi Neighbors, Franchise website design and development can be difficult, there’s no doubt about it. I had to find the right balance between a unique and unified brand identity, and a localized experience that accurately reflects the individual franchisees and their efforts. Due to the many benefits, I have structured the to read _domain.com/location _ domain.com = TLD /location = subfolder (location page) I have also built a customized CMS (e.g. Drupal) and have given each location access to manage their location page (subfolder). To accommodate local SEO optimization, franchisees have complete control in terms of optimizing their location page (subfolder). Title tags, meta description, Alt tags, etc... Will any local optimization performed in the subfolder (location page) be stiffened because it was not done in the TLD but in the subfolder ?
Local Website Optimization | | Jeffvertus1 -
I have a client in Australia that is going to set up a website that is in Chinese to service their Asian customer base (Indonesia, Singapore, HK, China). What domain should they use?
They're website is hosted on a .com.au domain. Should they host their Chinese language pages under their current domain (.com.au) using a subdirectory (i.e. /asia) or should they use another separate domain that they own that is a regular .com? Or does it really not matter?
Local Website Optimization | | 100yards1 -
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 -
Google still indexing home page even after with 301 - Ecommerce Website
Hi all,
Local Website Optimization | | David1986
We have a 301 redirect problem. Google seems to continue indexing a 301 redirect to our old home page. Even after months. We have a multiple language domain, with subfolders: www.example.com (ex page, now with a redirect to the right locale in the right country) www.example.com/it/home (canonical) www.example.com/en/home (canonical) www.example.com/es/home (canonical) www.example.com/fr/home (canonical) www.example.com/de/home (canonical) We still see the old page (www.example.com) in Google results, with old metadata in English and, just in some countries (i.e.: France), we see the correct result, the "new" homepage, www.example.com/fr/home in first position.
The real problem is that Google is still indexing and showing www.example.com as the "real" and "trusted" URL, even if we set: a 301 redirect the right language for every locale in Google Search Console a canonical tag to the locale url an hreflang tag inside the code a specific sitemap with hreflang tag specified for the new homepages Now our redirect process is the following (Italy example).
www.example.com -->301
www.example.com/en/home --> default version --->301
www.example.com/it/home --> 200 Every online tool, from Moz to Bot simulators see that there is a 301. So Correct. Google Search Console says that: on www.example.com there is a 301 (correct) in the internal link section of Google Search Console the www.example.com is still in first position with 34k links. Many of these links are cominig from property subdomains. Should we change those links inside those third level domain? From www.example.com to www.example.com/LOCALE/home? the www.example.com/LOCALE/home are the real home page, they give 200 code Do you know if there's a way to delete the old home page from Google results since this is 301? Do you think that, even after a 301 redirect, if Google sees too many internal links decides to ignore the 301? Thanks for your help! Davide0 -
Ideas on creating location based service pages for SEO value while not worrying about local SEO?
Hello and thanks for reading! We have a bit of a rare issue, where we are a nationwide distributor but have a local side that handles all tristate area requests, the sales that happen via local basically don't impact the online side, so we're trying to not focus on local SEO but in a sense worry about abroad local SEO. We want to try the location based service pages, but not for every state, at most 5 states and inside those pages target 2 to 3 big cities. Is this a waste of time to even think about or is this something that can be done with a careful touch?
Local Website Optimization | | Deacyde0 -
Search Result Brings Up Home Page
Hi all, I've been looking at some SEO work on our new CMS site that's been up for a few months now and when doing a search for a particular page which I know has good SEO and received a 'B' rating on the MOZ on page grader, our home page shows up and not our relevant page. I don't exactly want to worsen the SEO on our home page so that it doesn't show up, but why would my home page which is fairly generic and covers a large area of the business show up rather than the specific page which I am searching with exact keywords for? For example: If I was searching for 'bananas' my home page for fruits would show up rather than my bananas page which has been tailored around those keywords. Thanks
Local Website Optimization | | HB170 -
Rebranding a Website to a new Domain Name
Hi All, I'm looking to rebrand my current website to a new domain name.
Local Website Optimization | | Mark_Ch
In short the current website has out grown it's potential. The domain name is not memorable nor is it attracting a wider audience.
I will create my new website and 301 redirect the old website to the new, hence pass SEO value. Google Places
Having spoken to Google they tell me that I can simply change the URL in Google Places to the new URL. Articles on my current website
I have a number of rich content articles on my current website, can I simply create my new website and copy & paste these previously written articles? Google+, Twitter, Facebook, etc.
What should I do for accounts associated with the current website? Any other useful information would be much appreciated. Regards Mark0 -
Does building multiple websites hurt you seo wise? Good or bad strategy?
HI,rategy. So I spoke to a local Colorado seo company and they suggested to find whatever keywords is the most searched under my GWT's and put .com behind it and build other sites for other keywords. I was curious about this type of strategy. Does this work? This seo guy said I could just get a DBA bank account and such for each domain name etc. I am not wanting to mislead anyone, but I am curious if for the sake of promoting other services, if creating other websites with partial and EMD's are worthwhile? Another issue I worry about is if I put my companies phone number, then next thing you know there is 3 or 4 sites that use that same phone number. To me this does not build trust with Google. But being I am learning, maybe this is a common strategy, or doomed from the start. Just curious what you think. Would you build other sites to try and rank for other services? Or keep one sites and maximize it? Thank you for your thoughts. I just do not want to pay $3000 per site if it will hurt not help.
Local Website Optimization | | Berner0