New website server code errors
-
I launched a new website at www.cheaptubes.com and have recovered my search engine rankings as well after penguin & panda devestation. I'm continuing to improve the site but moz analytics is saying I have 288 medium issues 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?
-
Hi
as this is already a post which is markdr as answered it's better to make a new question and to reference this one (else nobody will notice). I would however strongly advice to ask this question as well on a more technical forum like stackoverflow.com
Dirk
-
Can someone please help me! the code that was suggested either didn't work or I'm not putting it in right as it broke my site and I have no idea how to fix it. This past weekend I put W3 cache on it and tinypng to compress my images and optimize the site. Google Page speed said my website is loading 30% faster but now I'm losing rankings again and the Moz crawl now says there are 618 pages with redirects compared to 300 last week. I didn't redirect any pages last weekend. Is it possible that the W3 cache did it? I was trying to fix the issues below from pagespeed which is why I put the W3 cache on it and did the image optimization.
Should Fix:
Eliminate render-blocking JavaScript and CSS in above-the-fold content
Optimize images
Consider Fixing:
Minify JavaScript
Leverage browser caching
Minify CSS
Minify HTML
-
Hi,
I am not really an expert in rewrite rules but normally the syntax is
RewriteCond: Condition
RewriteRule: If condition is met - use this rule to redirectThe order in which the rules are put is important - in the example above when putting first the redirect to https and then the rule that non-www should be redirect to http you are redirecting back to http instead of https.
So your htaccess would look like this (delete the italic part or replace the existing code by the italic version) - no guarantee it's going to work but worth a try. If not working - you could try to put your question on stackoverflow (regex & redirects are way to technical for most of us)
BEGIN WordPress
<ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L] => by default all url's in WP are redirected to index.php</ifmodule>RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d=> if file (f) or directory (d) are not found)
RewriteRule . /index.php [L] => redirect to root index
RewriteEngine On => the rewrite engine is already on - no need to put this a second timeRewriteCond %{HTTP_HOST} !^www. => if not www in request
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] => redirect to www(you could also try this rule:
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule .? http://www.example.com%{REQUEST_URI} [R=301,L]with example.com replaced by your site)
RewriteCond %{HTTPS} !=on => if not https
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] => redirect to https(You could also try this rule RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} )END WordPress
-
i have tried again to insert the code and it broke my site again. I was able to edit the same file to leverage browser caching successfully so I don't know what i'm doing wrong. I tried movng this code to right below RewriteEngine On and before the Rewrite Base. I tried it at the end where I tried before, no luck. the file now looks like
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]Browser Caching
FileETag MTime Size
<ifmodule expires_module="">ExpiresActive on
ExpiresDefault "access plus 1 week"</ifmodule>END WordPress</ifmodule>
Does anyone have suggestions of how to implement Andy & Dirks ideas?
-
Hi Andy
When I tried to do as you 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.
-
No problem at all. Let me know if you get stuck.
-Andy
-
Thanks Andy. I had no idea how to fix. I will give these a try today as soon as I fix a cart shipping glitch.
-
Thank you Dirk. That must be what moz sees too. I'm new to WP & worked with a developer early on who turned out to be just kinda coasting thru easy 3-5 page sites but not very good with ecommerce sites like mine. I've spent months finishing and fixing it. if you want a laugh, my old site until 3 weeks ago was still in frontpage and that's why (along with outdated SEO methods) i got hit hard by algorithm updates. This site was built on another server and moved. I've still been fixing outdated links to the dev server where i find them. I will try your suggestion today
-
Hi,
As Dirk said, 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]
<code class="htaccess" title="in your .htaccess file">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.
Let me know how you get on with these.
-Andy</code>
-
Hi,
The 302's are coming from redirects from https to http - example: https://www.cheaptubes.com/product-tag/monlayer-graphene-on-cu/ is redirecting to http://www.cheaptubes.com/product-tag/monlayer-graphene-on-cu/ with a 302 (you seem to have a lot of these redirects)
There also seems to be an issue with your url's. You have quite a large number of 4xx errors - mainly caused by trying to call .js files that normally would reside on the root & you try to call on a product page - example: http://www.cheaptubes.com/product/f-functionalized-graphene-nanoplatelets/js/foundation.min.js - while this file is actually on http://www.cheaptubes.com/wp-content/themes/cheaptubes/js/foundation.min.js - so I guess something is wrong with the way you construct your internal links.
Hope this helps,
Dirk
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
-
What is the difference between "document" and "object" moved redirect errors?
What is the difference between "document" and "object" moved redirect errors? I'm used to see "object moved" as a redirect chain issue that needs to be fixed, but this week my report contained a "document moved" redirect chain issue. And it's on our homepage. Looks like it might be a HTTP versus an HTTPS issue.
Reporting & Analytics | | Kate_Nadeau0 -
Multiple GA codes, one site.
Hi all, Is anyone running two GA codes on one website successfully? My organisation own a number of websites so we used to have one global GA code on all our sites to track global stats, and then we would also have site unique GA on each property to just track that one property. This worked fine, but of late we seem to be getting no data from the globally based code. Obviously, with the site-specific codes we can enter the name for that domain in GA but for the overall code, it is called 'all.com' I'm wondering if Google has now tied the GA domain to the code or if we are doing something wrong. All the codes are the same as they always were but have stopped working. As a stop gap, we have swapped to using Piwik as the all.com code. However, we are then comparing the stats in two different analytics programs so will get a different result. Also, it would be nice to be able to add the all.com to tools such as this to generate weekly reports. Anyone else having GA woe like this? Thanks. Carl
Reporting & Analytics | | WonkyDog0 -
Is there an efficient way to block/filter referral spam in Google Analytics for a large network of websites?
Hello, everyone - I'm looking for guidance on how to block or filter referral spam in Google Analytics. But I'm needing to block for an entire network of Wordpress websites. We have two networks which total over 2,500 websites. We are currently blocking sites we find out about via htaccess. This works, but only after we see we are getting hit with the spam. Updating 2,500+ Google Analytics accounts with filtering is not an ideal option due to the time factor and the fact that new bots coming out almost daily. We can continue the htaccess method, but does anyone have any other ideas for blocking referral spam for a large network of sites? These are the other ideas we have. 1. Blocking all traffic from Russia and China based up subnets. We know many will still get through, but it should block 50% of it, we hope.
Reporting & Analytics | | copyjack
2. Moving sites to Google Tag manager. This is a huge tasks but we have seen that sites using Tag Manager are not effected, at least for now. Other ideas are appreciated!0 -
What will be configuration for new version of tag manager for given below code?
Hello Expert, I am using new version of tag manager for enhance ecommerce. Now i have post related to enhance ecommerce for old version of tag manager this one - https://developers.google.com/tag-manager/enhanced-ecommerce In this post, below is the configuration of "Measuring Views of Product Details" for old version of tag manager, can you please tell me what will be configuration for new version of tag manager? ( mainly basic setting and firing rule ) Tag type : Universal Analytics
Reporting & Analytics | | bkmitesh
Track type : Pageview
Enable Enhanced Ecommerce Features: true
Use Data Layer: true
Basic Settings - Document Path: {{url path}}
Firing Rule: {{event}} equals gtm.js Thanks! BK Mitesh0 -
Tag Manager & Universal Analytics Code - Do you need both?
Hi Mozzers I've created a container for a domain in Google Tag Manager. Within that container I've created a tag for universal analytics with track type "Page view" and the firing rule "all pages". Can I then replace the Universal Analytics code with the tag manager code? Would it still track all the normal data in Google Analytics? There are no events setup up yet so that's not a concern but there are goals setup tracking which are triggered by a page view. Would they be affected? Thanks Anthony
Reporting & Analytics | | Tone_Agency1 -
Open internal links in a new tab increase bonus rate?
Hello! This week I used a simple method to reduce my blog Google Analytics bounce rate. My blog all the posts are guides, in order to follow them, user need to download a zip file (same zip file). Otherwise they can't. Therefore I added a separate blog post to download all the necessary files. As a result of that I can reduce my bounce rate from 62-70% to 45-50% level. Now I'm thinking to open that zip file download page in a new tab. If I open my blog zip file download page, in a new tab. It will again increase my bounce rate? I reduced my bounce rate using that zip file download page. Thanks!
Reporting & Analytics | | Godad0 -
How would you measure the SEO success of new site launch?
It has been 12 months, and it is time for some serious SEO reality check up. I think we have done some really nice things (social integration, on page optimization etc) but we honestly could do a million time better on some other elements (anchor, text, link building etc...). Would love to hear from the community what would be the top 10 criteria you would use to judge the quality of the SEO work done for a new site during is first 12 months. PS: we are a very content rich over 1,500 new articles/post in our niche with 12 months - our site is migraine.com Thanks
Reporting & Analytics | | OlivierChateau0 -
Why are we not seeing similar traffic patterns in a new market?
Good afternoon! We have a large real estate site with over 400,000 urls. We do pretty well with long-tailed search terms (like addresses--- 123 Main Street, Atlanta GA) so we get a decent amount of traffic (3,500-4,000 uniques a day). 2 months ago we opened up in a new market (Nashville) and hoped to see similar traffic for that market after a few of months, but so far we haven't. In fact, we only get about 200 visits a day. I can't seem to figure out why it's taking so long for us to generate similar traffic in Nashville that we see in Atlanta. All of the Nashville properties are in our sitemap and are being indexed by Google. Any ideas why we aren't seeing similar effects?Thanks in advance for any help you can provide! David
Reporting & Analytics | | clickscape0