Website server errors
-
I launched a new website at www.cheaptubes.com and had recovered my search engine rankings as well after penguin & panda devestation. I'm was continuing to improve the site Sept 26th by adding caching of images and W3 cache but moz analytics is now saying I went from 288 medium issues to over 600 and i see the warning "45% of site pages served 302 redirects during the last crawl". I'm not sure how to fix this? I'm on WP using Yoast SEO so all the 301's I did are 301's not 302's. I do have SSL, could it be Http vs Https? I've asked this question before and two very nice people replied with suggestions which I tried to implement but couldn't, i got the WP white screen of death several times. They suggested the code below. Does anyone know how to implement this code or some other way to reduce the errors I'm getting? I've asked this at stackoverflow with no responses.
"you have a lot of http & https issues so you should fix these with a bit of .htaccess code, as below.
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]You also have some non-www to www issues. You can fix these in .htaccess at the same time...
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]You should find this fixes a lot of your issues. Also check in your Wordpress general settings that the site is set to www.cheaptubes.com for both instances."
When I tried to do as they suggested it gave me an internal server error. Please see the code below from .htaccess and the server error. I took it out for now.
BEGIN WordPress
<ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^.$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.)$ http://www.%{HTTP_HOST}/$1 [R=301,L]</ifmodule>END WordPress
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@cheaptubes.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
-
I've been spending time fighting other fires since posting this question. Yesterday when WP automatically updated it crashed my site. I determined it was related to woo commerce...not good since most of my site is in the product categories & product pages of woo. I spent all night an today on it and got my site working. I read this forum which helped a lot
https://wordpress.org/support/topic/wordpress-https-conflicts-with-woocommerce?replies=4
When I turned off the force SSL button the site came back online. In working with dream host support I learned this
I'm the WP expert! We've heard rumblings of a strange issue in Woo where that setting is
forcing http redirects outside of the checkout page, which is causing Woo and core WP to send you back and forth between http and https when the siteurl is set to https._Since https://www.cheaptubes.com is set for your home AND site urls, there shouldn't need to be a force of SSL. That is, WordPress already knows it's SSL, and therefore you shouldn't need to be forcing it on those pages. _
I then received new crawl from Moz saying I now only have 9 errors, not 600. I am recrawling to verify its fixed but I think it is now. If anyone else ever has this issue, try unchecking the Force SSL button
-
Thank you so much Trenton. I will review the articles when I have a minute. I did try stackoverflow but my question didn't get any response. Thanks for the links, very helpful. I have done all the redirects thru Yoast SEO Premium. I talked with them yesterday and they said I have to do the redirects from the old website. I will try your suggestions
-
Hello CheapTubes!
There are two independent issues taking place here. Each is contributing to your issue. I'll address each and how to fix each, but it's important to note that these are two separate issues. I'd recommending deciding which to attack first and then address the other after that.
302 Redirects
To specifically answer your question, you're getting the majority of these 302 redirects because you're using absolute linking as opposed to relative linking. Here's a link to an article explaining the difference, but TL;DR: you're defining the exact (or absolute) URL you're trying to link to as opposed to using the URI (relative linking/pathing). For a concrete example, on your homepage you have an image and text (Graphene Oxides) where the a href is: Graphene Oxides
Since you explicitly (absolute) defined the URL, including the HTTPS, the browser then calls this page on your server. However, the content is actually housed at http://www.cheaptubes.com/product-category/graphene-oxide/ So the server tells the browser, "Hey, that file isn't there... but I'll help you out. It's actually over here" Where here = http version of page. This is exactly where the 302 takes place.If your goal is to solve the 302 issue, all you have to do is go through and change all of your internal linking architecture to relative calls as I mentioned earlier. To continue our above example, this means changing the a href for this specific element to: Graphene Oxides
As Dmitrii alluded to above/below, you can see this for yourself via the Chrome Inspector (Ctrl+Shift+I on windows; Cmd+Opt+I on Mac).
First, go to your homepage and after opening the inspector, navigate to the 'Network' tab and check the 'Preserve log' option. Then click your 'Graphene Oxides' link and you'll notice the first line that appears in the console will have a 302 Status code. If you click on the 'Name' of this (in our example, it'll be graphene-oxide/) you can dive in further and see that 'Request URL' & the 'Location' are not the same. With the former being https and the latter being http.If you're still unsure that this is correct, navigate to the 'Elements' tab within the Inspector and right-click the aforementioned 'Graphene Oxides' link on the actual webpage. This will highlight the exact location of the code in the Inspector console. Then right-click the a href call within the Inspector console and select the 'Edit as HTML' option. Change the a href to be Graphene Oxides and then click anywhere else and you'll notice that the element is changed within the Inspector console. Click over to the 'Network' tab again and click the clear button (looks like a circle with a line through it to the left on where the 'Preserve log' option was. Once this has been cleared, click the on-page link again and you'll see that there is no longer a 302.
htaccess Issue
I'm a little less qualified to advise you on this one. However, I can point you in the right direction. While Moz is great and amazing, for these more technical site issues I'd recommend checking out http://stackoverflow.com/. But after doing this, I'd recommend coming back here to make sure that you've got all your ducks in a row for the HTTPS transition. That said, I did some research for you.
I believe Dmitrii is correct again that the https rules should be higher than any other rules. Here's a link to a Stack Overflow article that addresses exactly your issue. And here's an article from SSL Shopper on doing the redirect using Apache's mod_rewrite functionality.
There's not much to add to what these two articles discuss as they're pretty thorough resources!I hope that helps! Let me know if you're having issues or have any follow-up questions!
Have a wonderful day!
Trenton
-
thank you so much Dmitrii - i will look into your suggestions and try them.
-
Hi.
The way to fix the problem is to know where it's coming from. When you are using browser's network tab, you can preserve log and see where 302s happening. Also you can see those pages in moz and other tools. I clicked around and found that it's happening in product categories and when you click on products. Obviously, since most of the website pages are product pages, you get 45%+ 302 redirects.
Now as how to fix it. Honestly, I'm not gonna be able to tell you, because I don't have your website's code. But find where those redirects are happening (by the way I don't even see any url changes, so maybe this is a problem as well), see how it's setup to work. It can be plugin errors or WP settings.
As for htaccess - I believe https rules should be before any other rules, all "R" should be R=301 and RewriteEngine on should be only one time.
Hope this helps somehow
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
-
Website Refresh - Lost Rankings
Hi, we refreshed our website a few weeks ago, with a new design. The structure has changed and pages do have new URLs. But the content, meta titles, etc have stayed the same and I have put 301 redirects in for all of the new pages (using the redirection plugin in word press). I have found that pages which ranked in the top 3 in the past are now nowhere. The page authority also shows as 1 for all of the pages. Is there something we should do to get the rankings and page authority back? Many Thanks
On-Page Optimization | | danieldunn100 -
Getting 404 Errors on Fonts After Website Redesign
Hi, I recently redesigned my website and I changed a few URLs so I have been keeping an eye on 404 errors and setting up redirects as needed. However, my 404 error log keeps getting filled font related URLs like this: <colgroup><col width="960"></colgroup>
On-Page Optimization | | DohenyDrones
| /fonts/AvenirLTStd-Heavy.otf), url(/fonts/AvenirLTStd-Heavy.woff), url(/fonts/AvenirLTStd-Heavy.eot), url(/fonts/AvenirLTStd-Heavy.eot? |
| /fonts/FrutigerLTStd-Black.otf), url(/fonts/FrutigerLTStd-Black.woff), url(/fonts/FrutigerLTStd-Black.eot), url(/fonts/FrutigerLTStd-Black.eot? |
| /fonts/AvenirLTStd-Heavy.otf), url(/fonts/AvenirLTStd-Heavy.woff), url(/fonts/AvenirLTStd-Heavy.eot), url(/fonts/AvenirLTStd-Heavy.eot? |
| /fonts/AvenirLTStd-Book.otf), url(/fonts/AvenirLTStd-Book.woff), url(/fonts/AvenirLTStd-Book.eot), url(/fonts/AvenirLTStd-Book.eot? |
| /fonts/FrutigerLTStd-Bold.otf), url(/fonts/FrutigerLTStd-Bold.woff), url(/fonts/FrutigerLTStd-Bold.eot), url(/fonts/FrutigerLTStd-Bold.eot? |
| /fonts/FrutigerLTStd-Bold.otf), url(/fonts/FrutigerLTStd-Bold.woff), url(/fonts/FrutigerLTStd-Bold.eot), url(/fonts/FrutigerLTStd-Bold.eot? |
| /fonts/FrutigerLTStd-Black.otf), url(/fonts/FrutigerLTStd-Black.woff), url(/fonts/FrutigerLTStd-Black.eot), url(/fonts/FrutigerLTStd-Black.eot? |
| /fonts/AvenirLTStd-Book.otf), url(/fonts/AvenirLTStd-Book.woff), url(/fonts/AvenirLTStd-Book.eot), url(/fonts/AvenirLTStd-Book.eot? |
| /fonts/AvenirLTStd-Heavy.otf), url(/fonts/AvenirLTStd-Heavy.woff), url(/fonts/AvenirLTStd-Heavy.eot), url(/fonts/AvenirLTStd-Heavy.eot? | Any idea what is causing these 404 errors? Is this something that might hurt my SERP?0 -
Duplicate Meta Tag error
I am getting Duplicate Meta tag error(under HTML improvement) for these kinds of pages http://www.gobol.in/catalogsearch/result/index/?category=&p=3&q=sharp+split+AC+1.5+ton&x=0&y=0 http://www.gobol.in/catalogsearch/result/index/?category=&q=sharp+split+AC+1.5+ton&special_price=4%2C10000&x=0&y=0 http://www.gobol.in/catalogsearch/result/index/?category=&q=sharp+split+AC+1.5+ton&special_price=5%2C10000_8%2C10000&x=0&y=0 What is the best way to resolve such type of error?
On-Page Optimization | | Obbserv0 -
Video Sitemap Error
Hi I am using a Video snippet and this error was generated about the duration tag. Can someone tell me how to fix it? and will this error prevent snippet to work on the sear results? Thanks Mozzers! 1rC5q7g.png
On-Page Optimization | | Ideas-Money-Art0 -
Why are my tags causing duplicate error?
Hi, When I run an SEO moz crawl it is picking up duplicate errors from my tags. Currently I have these set as domain url/tag/name of the tag. Is this incorrect? Is there anything I can do to stop this being picked up as duplicate pages? Thanks, Eliz
On-Page Optimization | | econley0 -
Why does my website have a lower DmT score than DmR?
Why does my website have a lower DmT score than DmR in subdomain and root domain categories? www.adagiowaterfeatures.com
On-Page Optimization | | AdagioWaterFeatures0 -
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 -
Website title question
Say you have a website url of a rather competitive keyword phrase, would it be beneficial for me to go ahead and name my site title the same as the url? And also should my site title go through every page, or should i consider having slight variations throughout the pages? for example: page title | site title or page title| slight varation of title on sub page? **edit - to further expand on the question a bit also, if my google places has the company name on _there - would it be effective to go ahead and use the company name in my site title? _ _Also if i have the main keyword in the breadcrumb as the home, does that effect my SEO credibility if it shows up on all the pages? _
On-Page Optimization | | tgr0ss0