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
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
-
International SEO: reposting my own posts to different ccTLDs versions of my website
Hello there Moz community! Moz has been super helpful for me and the team, keep up the good work! I have searched online for answers regarding my specific situation, but I haven't found any. I'm asking my fellow Moz users in hopes of an answer. Maybe this thread will help others too. I currently have this domain: https://eco-reusable.com/ I would like to target Ireland and the UK with my keywords so I have just bought eco-reusable**.IE** and eco-reusable**.CO.UK** My questions are: 1. In order to rank as high as possible for Ireland, do I create a new website for eco-reusable.ie using the same pages but changing all the content slightly so it is not duplicate content OR do I point the eco-reusable.ie domain to eco-reusable.com? By having two sites, we will add more hours but we don't mind if that will be of benefit in the longrun for ranking high in Ireland. I have the same question for eco-reusable.co.uk
Local Website Optimization | | Gael_Regnault
If we have to create three websites and make similar content (not duplicate), we will if it will be better for ranking high in ireland for .ie, in the UK for .co.uk and for the rest of the world for .com 2. If we create three websites, can I safely "copy/paste" my blog posts without being punished by Google for duplicate content? If so, how much variation do we have to have for each of the three sites if we are writing blogs that are the same context. Thank you in advance! 🙂0 -
Is there any way to report a website that is not complying with webmaster guidelines to Google?
Like how we can "suggest an edit" in Google Business Listings, is there any way to report Google about the webmaster guidelines violation?
Local Website Optimization | | Alagurajeshwaran0 -
Are local business directories worth the effort? Eg. White pages, Yell.com, Local.com?
Hi Guys, Im new to Moz and very keen to do SEO right without upsetting Mr. Google too much. Are local business directories worth the effort? Its a laborious job, but happy to do it, if its effective and won't be considered spammy by Google? Thanks
Local Website Optimization | | Fetseun0 -
Migrating to new website with new name and new content
Hi for the past few years I have been running a personal training company from the following domain name www.smpt.me. This has done well in the past and so has some authority in google as it was ranking well on page 1. Over the last 6 months I have set up a new website with some new business partners using the domain name www.healthbyscience.co.uk. This new website, whilst still a personal training website, has different content to the original. We want to use the new website rather than the old one and therefore my question is how I can use the old website to assist with the new website. Thanks
Local Website Optimization | | Health-by-Science0 -
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 -
Multilocation business, how can you rank for different categories in different locations with only branch pages?
Hello Mozzers, I am wondering how do you rank for categories locally where when you operate from multiple branches. Currently our eCommerce website has location pages for every category but I know that this is now classed as doorway pages and spammy so I am in the process of sorting out our site structure. I understand that the general format for having sites with multiple branches is to have a branch page per physical location and that's about it. Is there any more to this ? However, What confuses me though, is that if you offer all these services in all these branches, how are you going to rank for them locally if you don't have a specific page for each of them in that location? So for example - We rent Carpet cleaners , floor sanders, generators in each of our different branches. My site currently has a carpet cleaner hire <location>url , floor sander hire <location>url and a generator hire <location>url. Every branch has a url for each of my categories.</location></location></location> So if I was to get rid of all of my location category pages. How am I going to rank for these renting these products in different cities where our branches does without having specific location pages for them ? Is it just a case that google knows that because I have branch pages at locations x, y, x , then my carpet cleaner , floor sander and generator category pages will rank locally in those locations providing I have decent citations etc etc etc thanks
Local Website Optimization | | PeteC12
Pete0 -
Need Help: Trouble With Website and Analytics
Hey all, I have a client who I have been having the WORST time getting traffic and ranked for relevant keywords. I've tried so many things and have yet to see much progress after about 9 months. Site is mgmcdallas.com. I realized something REALLYY weird with this site a couple weeks ago. The business has a Dallas, TX address and really only services the Dallas/Fort Worth metro area. They recently started getting some of referral traffic from yelp.com/biz_redir. Weirdly, they've also been getting more sales calls and more salespeople filling out their contact form. Take January for example, they had 164 sessions and 119 of those were from this yelp referral. They DON'T advertise with Yelp, or get traffic from Yelp anywhere in Texas. You can see from below screenshot that they are all coming from California. analytics I've had our <acronym title="Search Engine Optimization">SEO</acronym> and developer look into and we can't figure out what's happening. Any thoughts? iubnZdu
Local Website Optimization | | BWrightTLM0 -
Potential sexaual harrassement issues in adding home address to website
Hello Google Local Experts I'm a little stress, to put it mildly. I have been working hard to get to grips with Google+ and Google Local. I have followed all the advice on Moz that I can lay me hands on. Following advice, I have added my private address (in rich text snippets) to the header of my own site. I've not felt particularly comfortable about doing that, but it's clearly one of the messages Google Local requires to be sure that your site is authentic. My concerns got concrete last evening when a new follower on Google+ started to send me private messages - culminating in asking where I lived. Despite family demands I went straight to my site and removed my house number. Now I know I'm messing up my NAP - but Ahh - my About section points straight to my site which at that point had my full address in Bold on each page of my site. I really am upset about this and think that Google should be rethinking their demand for displaying a companies address on the site. If you are self employed you are put in a vulnerable position which is morally questionable. Please would someone give me some advice on the best way to address my worries in the short term? Please could someone with a bit of clout point this potentail danger to women out to the powers that be in Google?
Local Website Optimization | | catherine-2793882