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
-
HTML Copy in Image Alt Text Field
Hi all, A quick question regarding HTML copy in Image Alt Text fields. An extended client has some landing pages containing infographics, but contrary to our recommendation - no intro copy or surrounding copy was used. The infographic was simply placed on the page, and all of the text of the infographic was placed into the Image Alt Text field. As far as I know, Google would still see that content in the Alt Text field and attribute it to the Infographic, although this would not be sufficient enough of an effort for the page to rank for any of the content used in that field. I'd just like to check that I am correct? And as a consequence - we should insist that they include some copy with the infographic, or alternatively, use HTML text overlays on the infographic instead of flat text in the image itself? Thanks!
On-Page Optimization | | Saatchi_HU0 -
Consolidating a Large Site with Duplicate Content
I will be restructuring a large website for an OEM. They provide products & services for multiple industries, and the product/service offering is identical across all industries. I was looking at the site structure and ran a crawl test, and learned they have a LOT of duplicate content out there because of the way they set up their website. They have a page in the navigation for “solution”, aka what industry you are in. Once that is selected, you are taken to a landing page, and from there, given many options to explore products, read blogs, learn about the business, and contact them. The main navigation is removed. The URL structure is set up with folders, so no matter what you select after you go to your industry, the URL will be “domain.com/industry/next-page”. The product offerings, blogs available, and contact us pages do not vary by industry, so the content that can be found on “domain.com/industry-1/product-1” is identical to the content found on “domain.com/industry-2/product-1” and so-on and so-forth. This is a large site with a fair amount of traffic because it’s a pretty substantial OEM. Most of their content, however, is competing with itself because most of the pages on their website have duplicate content. I won’t begin my work until I can dive in to their GA and have more in-depth conversations with them about what kind of activity they’re tracking and why they set up the website this way. However, I don’t know how strategic they were in this set up and I don’t think they were aware that they had duplicate content. My first thought would be to work towards consolidating the way their site is set up, so we don’t spread the link-equity of “product-1” content, and direct all industries to one page, and track conversion paths a different way. However, I’ve never dealt with a site structure of this magnitude and don’t want to risk messing up their domain authority, missing redirect or URL mapping opportunities, or ruin the fact that their site is still performing well, even though multiple pages have the same content (most of which have high page authority and search visibility). I was curious if anyone has dealt with this before and if they have any recommendations for tackling something like this?
On-Page Optimization | | cassy_rich0 -
On-site optimization: Do we need local terms inside subpages?
We're optimizing a franchise's website for local SEO, where each franchise location has its own page on the main corporate site. We've identified a lot of keywords which are relevant for each location. But I'm wondering if we need to include the location as part of the keyword we're optimizing for. For example, picture "best yoga studio" as a keyword that is relevant, and the franchise has locations in San Francisco and San Mateo. Do we need to optimize for "best yoga studio san francisco" on the San Francisco subpage and "best yoga studio san mateo" on the San Mateo subpage? Or do we optimize for "best yoga studio" and is Google smart enough to return the San Francisco page for San Francisco searchers and San Mateo for San Mateo searchers, without our additional on-page optimization? I should mention that the franchise sub-page is being submitted via Moz Local and will have all the Google business listing, consistent citations, etc. Thanks in advance, --eric
On-Page Optimization | | EricOliver0 -
Should I block google indexing "search.php"
My question is I have a search page on our website , you can search by date, number of people staying and so on, I am just wondering should block this in the robots.txt ? Because we have pretty URL'S already for searching by county and searching by towns. I cannot see any benefit of having e.g "search/search.php?sp_dateFrom=16%2F12%2F2015&sp_dateTo=23%2F12%2F2015&sec_drop%5B%5D=727&spesh_town_id=764&q=&occupants=5&bedrooms=3&submit=SEARCH#search" indexed. Would I be correct in doing this ?
On-Page Optimization | | McCaldin0 -
Stolen Content reposted on other sites. How does this affect ranking?
Visitors often copy and paste my content and post it elsewhere... on Facebook, on Tumblr, on forums and sometimes on competing websites... but they don't link to me. How does Google treat this duplicated content? What is the best way to handle it? File DCMA claims or ask them for a link?
On-Page Optimization | | brianflannery0 -
Help! A site has copied my blog!
My site tanked on July 21 and I have been working so hard to bring it back up but nothing is working. Today I looked at "Links to Your Site" on Google Webmasters and I see a copy of my site on another URL. mysite.eemovies.org/mycategory/mypost The domain name is eemovies.org and then all my stuff is wrapped around it and all my content is there! How do I stop this?!
On-Page Optimization | | 2bloggers0 -
Site Wide Title Tag Discussion
Do you think it's good to have an instance of your primary keyword occur on most of your site's title tags throughout your site? Or do you think having the keyword occur in most title tags throughout the site will dilute the ranking ability for the home page? I haven't read much about this in "best practices" for title tags. hmmmm...
On-Page Optimization | | Joes_Ideas0