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
-
Website excluded from indexing, google-selected canonical: N/A
The google search console revealed to me that none of my pages was indexed, all pages are listed in the 'excluded' section "duplicate, google chose different canonical than user".
Reporting & Analytics | | Fibigrus
But in the URL-inspection tab it shows me google-selected canonical: N/A Indexing and crawling is both allowed. Don't know how to get my pages to be indexed correctly. (by the way, they do NOT exist in other languages, so that can't be a reason why google might think they are a duplicate. There's definitively no other version of those pages available)0 -
My automated build system is creating a duplicate website
Because of the tools my company is using for CI/CD (A CI/CD pipeline helps you automate steps in your software delivery process, such as initiating code builds, running automated tests, and deploying to a staging or production environment.) an extra URL is generated. The canonical for the generated site is that of our main website, but other than that it is the same website. Could this new URL compete with our website? Will Google count it against us since it is the same content BUT with canonical (it is not noindex-ed)? Does it matter? Surely others are using this method? Answers/thoughts will be greatly appreciated. Thank you.
Reporting & Analytics | | RoxBrock0 -
If website users don't accept GDPR cookie consent, does that prevent GA-GTM from tracking pageviews and any traffic from that user that would cause significant traffic decreases?
I've been doing a lot research on GDPR impact and implementation with GTM-GA for clients, but it's been 12 months since GDPR has gone live I haven't found anything on how GA traffic has been impacted if users don't accept cookie consent. However, I'm personally seeing GA accounts taking huge losses in traffic since implementing GDPR cookie solutions (because GTM/GA tags aren't firing until cookies are accepted). Is it common for websites to see significant decreases in traffic due to too many users not accepting cookie consent? Are there alternative solutions to avoid traffic loss like that and still maintain GDPR compliance? It seems to me that the industry underestimated how many people won't accept cookie consent. Most of the documentation and articles around GDPR's start (May 2018) didn't foresee or cover that aspect properly, everything seems to be technically focused with the assumption that if implemented properly most people would accept cookie consent, but I'm personally not seeing that trend and it's destroying GA data (lost traffic, minimal source attribution, inaccurate behavior data, etc). Thanks.
Reporting & Analytics | | Kickboard2 -
Finding missing GA code
Hi guys, I'm trying to find missing Google Analytics code on pages using Screaming Frog. I usually use Screaming Frog to find pages missing GA tracking but sometimes i encounter websites like: http://tinyurl.com/qjbdyxr which don't contain the GA code in the html (even though there is a GA code on the page). I'm guessing its located somewhere else and pulled in from somewhere? Any suggestions? Cheers,
Reporting & Analytics | | jayoliverwright
Chris0 -
New e-commerce launched, drop in traffic
One of our clients launched a new e-commerce site and there was a significant (60%) drop in traffic in Google Analytics following the launch. We are about 10 days into the new site, and our suspicion is that the move has caused a decrease in their site authority which has lowered their search position. The old site had the store at sitename.com/store. The new site has a Shopify store at shop.sitename.com. There were very few external followed links to the store pages, so we thought that there would be little effect for overall site traffic by moving the store to a subdomain. Any recommendations for next steps on diagnosing the problem and working towards a solution?
Reporting & Analytics | | DesignHammer0 -
Best way to generate analytics reports for listing style website
I'm working on a website that includes dedicated pages for ~40 local businesses, and I need to be able to generate and export some basic reports I can send to each business. The data I need for each report is split between general sitewide data: total number of visitors to the site for month. number of visitors to each main category page what country they are from (main countries) - top 5 traffic source / keywords avg time on site As well as specific data for each individual page: how many people viewed specific total pages Time spent on individual page. Would this be possible with custom reports in analytics? I can see the number of different reports being difficult to maintain, especially as site grows. Anyone had expereince on a similar site of ideas on the best way to do this? Thanks
Reporting & Analytics | | zeald0 -
Is Analytics Code for SubDomains different?
I am currently tracking site performance on our website with Google Analytics. Recently, we've brought a Wordpress blog into our site as a subdomain blog.accupos.com. Though we did this a few months ago, we do not have Analytics data for these pages within the wordpress platform. I've found where to paste the code, in the Footer block of the Wordpress template, just before the close body tag (is this the best recommended way?) and just have one question about WHICH code to paste. Can I add the original code, same as the rest of the site? Or does Analytics have a different code for tracking subdomains? If so, do I need to replace existing code for the rest of the site? I hope I worded this okay. Please help. I'd appreciate it! Derek M.
Reporting & Analytics | | DerekM880 -
SEOMoz & Google Webmaster Tools crawl error conflicting info
Site im working on has zero crawl errors according to SEOMoz (it did previously have lots since ironed out) but now looking at GWebmaster Tools saying 5000 errors. Date of those are not that recent but Webmaster Tools line graph of errors still showing aprox 5000 up to yesterday There is an option to bulk action/tick them all as fixed so thinking/hoping GWT just keeping a historical record that can now be deleted since no longer applicable. However i'm not confident this is the case since still showing on the line graph. Any ideas re this anomalous info (can i delete and forget in GWT) ? Also side question I take it its not possible to link a GA property with a GWT account if created with different logins/accounts ? Many Thanks Dan
Reporting & Analytics | | Dan-Lawrence0