The correct way to go from PHP site to HTML site?
-
I have a website fully coded in PHP and I am doing a re-design over to an HTML site. I searched through the Q&A and there were some conflicting answers. Some said you will need to 301 all the pages. Others said to use the .htaccess to parse all the files as html.
What is the correct way I should go about this?
Thanks in advance!
-
Hi James,
As Cocoonfxmedia noted, it depends a good deal on your CMS situation.
For SEO purposes, there's no difference between PHP and HTML - search engines don't encounter PHP code, it occurs on the server and then the server sends the search crawler the HTML output.
I'd have to see the site in question to understand what would have to happen from a SEO standpoint to ensure things carry over smoothly, but in general I'd recommend focusing on ensuring that any page URLs that are linked to from other websites (Open Site Explorer is a good way to check on this) are 301 redirected to their best replacement URLs on the new site.
301 redirecting every single URL is not necessary. I'd focus on the URLs that have links from external websites. Search engines will adjust properly for the other pages, dropping the old URLs once they get a 404 error and finding/indexing the new pages from the top-level pages.
Best,
Mike -
"I personally think you can keep the PHP. The only reason I can see changing to HTML site is if you don't have a CMS system running"
The new site is already coded in HTML though - Is there just some code I can add to .htaccess to tell spiders that all PHP are not HTML?
Obviously I will need to change any internal/external links to the new extension. I want to make sure I cover all my bases and do this properly.
-
I personally think you can keep the PHP. The only reason I can see changing to HTML site is if you don't have a CMS system running. I would 301 redirect the old pages to the new.
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
-
My site takes a lot of time to index On SERP
Hello great Moz contributors, I'm working on a 4-months-old site https://www.voxlyrics.com/, which I didn't see improvement after the Google December core update. What I'm facing right now is that my newly published posts take a lot of time to index on Google search results and it affecting my performance. While my competitor's sites index in less than a minute. I could've used the Google index tool which they removed a few months ago assumed they bring the feature back. Meanwhile, my site passed web.dev test perfect what happens very rarely. Is there any other thing needed to be done so that my posts will be indexing in less than a minute? Any help will be appreciated!
On-Page Optimization | | mmesoma0 -
Site has 302 redirects for HTTP to HTTPS when it should be 301
Hey all, In the latest Moz crawl, certain pages on our website have shown as having 302 redirects for the http to https, but not all. There should be a 301 solution, but wanted to see if anyone had any advice or guidance. Thanks!
On-Page Optimization | | Julzseo1 -
Correct robots.txt for WordPress
Hi. So I recently launched a website on WordPress (1 main page and 5 internal pages). The main page got indexed right off the bat, while other pages seem to be blocked by robots.txt. Would you please look at my robots file and tell me what‘s wrong? I wanted to block the contact page, plugin elements, users’ comments (I got a discussion space on every page of my website) and website search section (to prevent duplicate pages from appearing in google search results). Looks like one of the lines is blocking every page after ”/“ from indexing, even though everything seems right. Thank you so much. FzSQkqB.jpg
On-Page Optimization | | AslanBarselinov1 -
Duplicate Page Content - default.html
I am showing a duplicate content error in moz. I have site.com and site.com/default.html How can I fix that? Should I use a canonical tag? If so, how would i do that?
On-Page Optimization | | bhsiao0 -
Client Worried About SEO Decline After Site Redesign
Hi, We're in the process of redesigning www.directvillasflorida.com/ for a client. The client has recently expressed concern that their rankings may drop off after the change. Here are some facts about the site: As you can see, the current homepage is _very _keyword heavy. They have a DA of 26 and are ranking #1 for 'florida villas', higher than their more authoritative competitors. They are also ranking #1 in the mobile search results, despite not being mobile-friendly. Their link profile is pretty average and the anchor texts are pretty keyword-rich 'florida villas' appears 30 times with a 4.41% keyword density 'florida' appears 66 times with a 3.31% density The client has admitted keyword stuffing years ago and hasn't changed anything because it worked and still is working. In the site redesign, we've cut out a lot of the spammy, keyword-rich content and he's worried he'll suffer because of this. Any ideas what to do here? It seems clear that the site is breaching Google's guidelines, but, for whatever reason, isn't being picked up by Google. Cheers, Lewis N.B. The client is just paying us for a redesign, not SEO.
On-Page Optimization | | PeaSoupDigital0 -
Site wide 301 or canonical links.
Hi guys, I'd like add code to my header file to specify www. as opposed to just http:// for the canonical links across my entire site. How can I do this? I'd like it to be site wide code that I can just add to my header.php file which is included across the site.
On-Page Optimization | | absoauto0 -
What is the best way to integrate our blog into our ecommerce website?
Hi all, We run an eCommerce website at www.oursite.com plus a blog (including news / articles / reviews / how-to guides etc.) at blog.oursite.com (those aren't really our site URLs, BTW ;-). For SEO reasons previously discussed on here, and for ease of use for our customers / browsers, we now want to integrate the two more closely. This will mean: Our blog will move to www.oursite.com/blog We will try to feature the blog content in places where it is relevant to customers (so e.g. news and blog posts about shoes would appear on our shoes category page, a review of some Adidas XL1000 shoes would appear on the Adidas XL1000 shoes product page) The blog is currently run on a wordpress.com site, so we'll need a new CMS (or wordpress.org) to get more control of the data. My issues are that, although it's good from a users point of view, having blog articles appear in lots of different places on the site might cause issues with duplicate content from a search engine's point of view. Has anyone got any pointers on how to integrate the two in a way that will make most use of the good original content coming out of our blog, while not "watering it down" by spreading it around too much? Can anyone point to examples of shops that do this well? Is there any software (other than Wordpress) that people would recommend using? As always, any help greatly appreciated! Alex
On-Page Optimization | | reddogmusic0 -
Advice needed about site
I would like to get advice about the site http://www.wb-3d.com regarding what we should do to get it highly on Google. This seems to be a tough one as there is not enough content on the site. I would immensly appeciate any suggestion to improve the rankings. Specifically, what we should tweet and update on facebook. Thanks
On-Page Optimization | | seoug_20050