Bad code on Learn Seo Redirection info Page
-
Is it just me, or is the Redirection resource page missing the exclamation point (!) in this code. If so, this could really mess someone's site up if they copy and paste.
http://www.seomoz.org/learn-seo/redirection
http://screencast.com/t/n7lknZ32G9xF
Redirecting Canonical Hostnames: The original developers at SEOmoz needed to redirect any requests that do not start with www.seomoz.org to make sure they included the www. They did this not only because it looks better, but to avoid common canonicalization errors. Redirect: http://seomoz.org/To: http://www.seomoz.org/ Redirect: http://mail.seomoz.org/To: http://www.seomoz.org Redirect: http://seomoz.org/somefile.phpTo: http://www.seomoz.org/somefile.php Solution: Add the following directive: RewriteCond %{HTTP_HOST} ^seomoz.org [NC]RewriteRule (.*) http://www.seomoz.org/$1 [L,R=301] Explanation: This directive tells apache to examine the host the visitor is accessing (in this case: seomoz.org), and if it does not equal www.seomoz.org redirect to www.seomoz.org. The exclamation point (!) in front of www.seomoz.org negates the comparison, saying “if the host IS NOT www.seomoz.org, then perform RewriteRule.” In our case RewriteRule redirects them to www.seomoz.org while preserving the exact file they were accessing in a back-reference.
*emphasis added by me
-
I think I'm becoming anal retentive. Just today, I took the time to contact two "seo" companies with linked articles from the Learn Seo page to let them know that they might want to redirect their broken links! I can't imagine having a link like that and letting it just crumble in to little 1s and 0s, not to mention I didn't get the info I was wanting. I'm sure they'll think I'm nuts. I then start thinking to myself, "self, you might know a thing or two" and then another robot and his tag issue come whack me back in my place...
thanks for the confirmation Cyrus. I just found out there's a support forum for this kind of thing..probably a better place for these issues.
-
Hi Holly,
Good catch. The code should look like:
RewriteCond %{HTTP_HOST} !^www.seomoz.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R,L]Explanation:
This directive tells apache to examine the host the visitor is accessing. If it does not equal www.seomoz.org, redirect to www.seomoz.org. The exclamation point (!) in front of ^www.seomoz.org negates the comparison, saying “if the host IS NOT www.seomoz.org, then perform RewriteRule.” In our case RewriteRule redirects them to www.seomoz.org while preserving the exact file they were accessing in a back-reference.
I'll send a note to our help team to get this fixed.
Thanks!
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
-
Pages with Temporary Redirect (CTA)
I had MOZ crawl my site and I had 5 CTA pages with a temporary redirect. How do I correct the issue? Thank You! -Nick
Moz Pro | | X2Metrology10 -
Which kind of backlink is best for SEO
After complete the jobs of keywords, it may worth to spend more time for building up more backlinks to enhance the SEO, so do you have any suggestion about which kind of backlink is best to build? as I know now, the backlinks are classified to be: 1. profile article, 2. book mark, 3. signature, 4. wiki article, 5. blog comment etc. I am very new for SEO, so it's welcome to give me any suggestion or comment for my opinion as above. Thanks a lot! -John.
Moz Pro | | Steplead0 -
Percentage of good links vs. bad
Hi Does anyone know the best way of determining good links from bad links using the SEO Moz tools? I bought some directory links to two or three pages on my site a few years back. The were all very obviously spammy because of the anchor text and I didn't have a high enough ratio of good links to counteract them. I read somewhere that if more than 10% of the links to a page have the same (or similar) anchor text, it's obvious that you're on the bad list.
Moz Pro | | nsjadmin0 -
Google Hiding Indexed Pages from SERPS?
Trying to troubleshoot an issue with one of our websites and noticed a weird discrepancy. Our site should only have 3 pages in the index. The main landing page with a contact form and two policy pages, yet google reports over 1,100 pages (that part is not a mystery, I know where they are coming from.....multi site installations of popular CMS's leave much to be desired in actually separating websites) Here is a screen shot showing the results of the site command: http://www.diigo.com/item/image/2jing/oseh I have set my search settings to show 100 (the max number of results) results per page. Everything is fine until I get to page three where I get the standard "In order to show you the most relevant results, we have omitted some entries very similar to the 122 already displayed." But wait a second, I clicked on page three, now there are only two pages of results and the number of results reported has dropped to 122 http://www.diigo.com/item/image/2jing/r8c9 When I click on the "show omitted results" I do get some more results, and the returned results jumps back up to 1,100. However I only get three pages of results. And when I click on the last page the number of results returned changes to 205 http://www.diigo.com/item/image/2jing/jd4h Is this a difference between indexes (same thing happens when I turn instant search back on, Shows over 1,100 results but when I get to the last page of results it changes to 205). Any other way of getting this info? I am trying to go in and identify how these pages are being generated, but I have to know what ones are showing up in the index for that to happen. Only being able to access 1/5th of the pages indexed is not cool. Anyone have any idea about this or experience with it? For reference I was going through with SEOmoz's excellent toolbar and exporting the results to csv (using the Mozilla plugin). I guess google doesn't like people doing that so maybe this is a way to protect against scraping by only showing limited results in the Site: command. Thanks!
Moz Pro | | prima-2535090 -
Automated SEO Report for Agencies
I have a lot of SEO reports to send out, SEO Moz is awesome but it's not designed for this kind of work. I would like an automated report that does an on page optimization report on the potential client's site, finding errors etc it does not have to include fixes for each. This is just a basic report but it must look nice and be user friendly. I have looked at Raven and it looks ok however it does not have any decent On Page Optimization reports. I know I could crawl and then delete the campaign in SEO Moz but that is very time consuming and far from ideal. If anyone knows of a solution please let me know 🙂
Moz Pro | | SEOKeith0 -
How do you prioritize your SEO efforts?
If you're an in-house marketing person, almost by definition, you're neither a specialist or expert in the variety of things one might do to improve SEO. We do a bunch of stuff in-house and hire people for other stuff that needs to be done and the work is never complete! What do you do, as the de facto in-house, on-staff "expert" for SEO? I'm purposely leaving this question fairly open-ended to solicit advise, ideas & direction to develop a framework and a guide for our efforts. Also, I'm not intentionally ruling out pro's...I'm open to your opinions too - but I will probably only hire you unless you have a full tool bag of skills that include the ability to write auto-responders, write & blog relevant content, set up and monitor page rank, do SEO, set up AdWords campaigns, etc. at a the nice price. And I'll only do that if I can't do/learn/achieve all of the above to a certain degree on my own. Although I'll probably never stop questioning processes, costs and everything else associated with hiring a pro...all of which will make me a pain-in-the-butt client you probably don't want. Thanks!
Moz Pro | | karlseidel2 -
Historical error info on SEOMoz?
Is it possible to get a report of errors that were on a site back in April? Does SEOMoz keep that data available? There was a big decline in the number of errors on one of my sites and I'm trying to go back and see what it was. --Steve
Moz Pro | | Aggie0 -
In page analysis
Hello, Seomoz did a crawl of my whole page, but under in page analysis grade rankings there have been no crawls? how can I initiate one?
Moz Pro | | AdamGymyGym0