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
-
SEO impact of redirecting high ranking mirror site to the main website
During SEO audit for a client I noticed that they had over a dozen duplicate websites that are carbon copies of the main website. This was done via CMS platform and DNS. One of the mirror sites has about 400 indexed pages and has Moz DA of 42 and 137k External Equity-Passing Links. Full metrics comparison is attached. I originally planned on doing rel="canonical" on the mirror site but the CMS vendor never even heard of it and is refusing to implement it in the header. My only other option is doing one to one 301 redirects. Since the mirror site ranks well, even competes with main domain for some positions on the 1st page of SERP, what will be the impact after the redirects? Is doing 301's still the best option? Thanks! PrUpN3q
Moz Pro | | dasickle0 -
Local SEO does not rank well
Hello everybody, before 3 months i began seo in gialia.net.gr. Its an eshop based on symfony framework. We started with on-page seo optimization and after making links in directories, forums and article directories. After 2 months we saw rankings for niche keywords (γυαλια ηλιου, γυαλια ηλιου προσφορες) at 5th and 8th page of google.gr. Now, the rankings does down and i cannot unserstand the reason. I checked old backlinks with opensite explorer, and found some spam backlinks links (3/10). Is this the reason that seo not going well? I am very dissapointed and i would like to tell me you opinion about what is going wrong with that site. My customer owns one more domain, fotispapoulias.gr and i am thinking to move all the site that is running on gialia.net.gr to fotispapoulias.gr (301 redirect to all links). The fotispapoulias.gr ranks better in the same niche keywords without seo. Is it good idea? Will achieve better rankings or not? Thanks
Moz Pro | | simplewebsol0 -
"redirects" with no "redirect address"?
Episode 2 of "Damon the idiot noob" web series . . . I have like . . ..90 plus temporary redirects in my moz "medium priority diagnostics". But the majority of them have a url, but no redicret url. How can it be a temporary redirect if there is no redirect address? Some of the addresses simply don't make any sense. Like: http://www.thirdcoastsigns.com/catalog/seo_sitemap/product How on earth would a "seo_sitemap" be followed my a "/product"? This is a Magento site, so I know some of these things get created automatically . .. but what on earth is going on here? Help welcome, appreciated, and welcome. Did I mention it is welcome and appreciated?
Moz Pro | | damon12120 -
Affordable SEO?
Hey,
Moz Pro | | ChrisHolgate
I love the resources available to me through Moz.com and although I've found it's possible to make a half decent attempt at improving our site using these tools. I have however got to the point where it would be nice to have a second opinion as my view on our site and what can be achieved is no doubt somewhat stale. Obviously asking the community through Q&A is a start and I have benefited greatly in the past from your advice but I wouldn't expect anybody to give our site more than a two minute glance for free. As such I'm hoping to locate someone that I can pay to talk things over with just to get some fresh ideas and perhaps a list of tasks that my staff and I can continue to undertake over the coming months. I appreciate that Moz has a list of recommended SEO companies however these all seem to be targeted towards larger brands and I can imagine a relationship with one of these companies being less personal than I would like. Asides from going through lists of users and checking out their profiles individually, is there a resource that lists the smaller independent on Moz.com and if so where can I find it? Alternatively are their any external resources that might help me to find someone that would be a good match?
Thanks for your help. Chris1 -
SEOMoz On-Page Report Card
This question is for one of the SEOMoz staff. With the ongoing changes and improvement in algorithms, does the SEOMoz team keep the "On-page Report Card" up to date with best practices?
Moz Pro | | tdawson090 -
On-Page Report Card B grade because its a PPC landing page
I have a PPC landing page with I'm getting a B grade on the On-Page Report Card. Can I just ignore that, it says its a "Critical Factor" Thanks Mike Crawl status <dd>Status Code: 200
Moz Pro | | mjrinvent
meta-robots: noindex,nofollowall
meta-refresh: None
X-Robots: None</dd> <dt>Explanation</dt> <dd>Pages that can't be crawled or indexed have no opportunity to rank in the results. Before tweaking keyword targeting or leveraging other optimization techniques, it's essential to make sure this page is accessible.</dd> <dt>Recommendation</dt> <dd>Ensure the URL returns the HTTP code 200 and is not blocked with robots.txt, meta robots or x-robots protocol (and does not meta refresh to another URL)</dd>0 -
Creating a SEO Report
We are looking to create a SEO report that is broken down by keywords. The traffic that the keywords generate for the site, the rankings in the search engines, the number of backlinks that have used the keyword as anchor text. We have a few tools that can do some of this, but are looking to find something that can aggregate all this info into a clean report. We are wondering if anyone knows a good website/application that can help manage a month-to-month report on the aspects above. Thanks!
Moz Pro | | insitegoogle0 -
Domain vs. page authority?
hey i've been told that page auth is more important than domain authrity on open site.. why is that?
Moz Pro | | daxvirgo0