301 help, whats the best way
-
Hi all
right now i have 301 redirects setup in my htaccess file
i recently redesigned our site so i have been redirecting all the old urls to the new ones.
I saw a post about having all your urls the same format, so i updated my htaccess file to redirect all urls from http://www.mysite.com/food to http://www.mysite.com/food/ (added a forward slash).
Now on my latest seo crawl i see all my site urls, redirecting to the forward slash url.
am i doing this right,
thanks
will
-
Sounds like you're doing it right!
You want your URLs to end in a trailing slash, and for the URLs that don't, you want a training slash added. If that's what's showing up in your reports and in your spot checks, you're doing great!
You may want to write a code that does this automatically -- e.g. that adds a trailing slash to any URL that doesn't have one, if that url doesn't inclue a filetype (to exclude bad things like /image.png becoming /image.png/)
Note: If you're on Wordpress, you might try a plugin like http://wordpress.org/extend/plugins/smart-404/ to catch any bad urls that might rear their heads later -- it or something like it (if you're not on WordPress) would also likely take care of the redirection issue you're having altogether.
-
Hi Will,
Looks like you've got it right.
Without the 301 redirect you'd have two versions of the same page (one with the trailing slash, and one without), so 301 redirecting all the URLs to the version with the trailing slash is definitely the best way to go.
If your crawl report shows the redirects are active you should be good to go.
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 best way to redirect visitors to certain pages of your site based on their location?
One website I manage wants to redirect users to state specific pages based on their location. What is the best way to accomplish this? For example a user enters the through site.com but they are in Colorado so we want to direct them to site.com/colorado.
Technical SEO | | Firestarter-SEO0 -
Pagination Help
Hi Moz Community, I've recently started helping a new site with their overall health and I have some pagination issues. It's an ecommerce site and they currently don't have any pagination in place except for these tags: Prev 1 2 3 ... 66 Next I understand what these are doing (leading visitors to the previous, next or last page, but do these do anything for search crawlers or does the site need to have an option of:
Technical SEO | | IceIcebaby
1.rel=next/rel=prev
2.canonical leading to the view all page (the view all page takes a long time to load) Thanks for your help. -Reed0 -
What is the best way to stop a page being indexed?
What is the best way to stop a page being indexed? Is it to implement robots.txt at a site level with a Robots.txt file in the main directory or at a page level with the tag?
Technical SEO | | cbarron0 -
Blogger and 301
HI, is it possible to make 301 redirections from a Blogger blog to a new domain name? http://name.blogspot.fr > http://www.domain.com Thanks for yours answers. D.
Technical SEO | | android_lyon0 -
Best way to deal with these urls?
Found overly dynamic urls in the crawl report. http://www.trespass.co.uk/camping/festivals-friendly/clothing?Product_sort=PriceDesc&utm_campaign=banner&utm_medium=blog&utm_source=Roslyn Best way to deal with these? Cheers Guys
Technical SEO | | Trespass0 -
Canonical in head best practice
Hi Is putting a list of canonical no follow links in the head the best practice? From SEO Moz analysis urls of duplicate content was flagged but now I have lots of cononicals in the head of my doc and the code looks untidy see head here : http://carpetflooringsdirect.com/ Is there a cleaner way of doing this? and how do I retest to see if I have fixed? Many thanks Matt
Technical SEO | | Matt-J0 -
Whats happened to my rankings
Hey everyone, I hope someone might be able to help me figure out what has gone wrong here. I have a website which was slowly growing in rankings. The domain used was a .net However, It is a UK based business so I shifted this to a .co.uk domain and then followed googles advice in webmaster tools for moving address. ie, copy site, verify in GWMT and then 301 the old site. Now the .net had 71 indexed pages out of 73. But after 2 months .co.uk only has 41 out of 73 indexed. At the end of last week I did change the theme on my website although the content / urls have all remained the same. I have gone to check my rankings this morning and the site has totally bombed. Even the own brand name does not ranking in top 10 pages. I have not done an major link building at all yet for the site and any links that are there are all high quality from industry related authority sites. Looking at GWMT the latest links all look ok, nothing spammy but one thing I did notice is that it shows the .net domain providing 193 links via 301and also individually a great deal of the links that point to .net but have shown in .co.uk What I would like to know if have I actually done something wrong? Should I just kill the 301 (i am loathed to do this as a few of the links to this took me a long time to get), after spending a great deal of money developing my site and just starting to see some nice progress in the natural rankings and google has gone and pulled the carpet from under me. I would understand if I was doing something wrong but I have made strenuous efforts to ensure the linking on this site is whiter that white. Oh, I have had no warnings in my messages at all. Thanks in advance for any advice.
Technical SEO | | easyrider20 -
What's the best way to deal with an entire existing site moving from http to https?
I have a client that just switched their entire site from the standard unsecure (http) to secure (https) because of over-zealous compliance issues for protecting personal information in the health care realm. They currently have the server setup to 302 redirect from the http version of a URL to the https version. My first inclination was to have them simply update that to a 301 and be done with it, but I'd prefer not to have to 301 every URL on the site. I know that putting a rel="canonical" tag on every page that refers to the http version of the URL is a best practice (http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139394), but should I leave the 302 redirects or update them to 301's. Something seems off to me about the search engines visiting an http page, getting 301 redirected to an https page and then being told by the canonical tag that it's actually the URL they were just 301 redirected from.
Technical SEO | | JasonCooper0