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
-
Newby question about 301 redericts
I work for a design firm who has been updating a website for a client. In addition to a new look, we've consolidated redundant pages for a more streamlined site. My question is this: when I have replaced 3 somewhat redundant pages on the old site with 1 page on the new site, should I 301 redirect all the former pages to the one new page. I know this question is beyond basic but I'm pretty new to SEO, so be gentle.
Technical SEO | | TheKatzMeow0 -
301 and 302 for same link
Just trying to find out if this may be the root of a slight traffic dip and also if we should be redirecting differently. We relaunched and did 301 redirects to the new site, initially. Then, we decided to change from http to https. Our HTTP status now looks like this when using the MozBar: HTTP/1.1 301 Moved Permanently – http://site.com/oldurl
Technical SEO | | MichaelEka
HTTP/1.1 302 Found – https://site.com/oldurl
HTTP/1.1 200 OK - https://site.com/new Should we be changing that 302 to a 301? Are we losing link equity due to this? Thanks.0 -
301 Redirects in subfolders
Hi, we're making our site into a static site but I would like to transfer the Google juice. Most of the links and database exist on subfolders though. Could I simply do 301 redirects on the subfolders and retain the value or does it have to be on the full domain?
Technical SEO | | Therealmattyd0 -
What is the best way of inserting keywords into a social networking site
We have a social networking site called Yookos (www.yookos.com). As per the norm, many of the pages of the site carry user generated content and can only be accessed by the users themselves. i created a keyword list that our technical person the uploaded onto the site but SEOmoz shows that these keywords cannot be picked up.
Technical SEO | | seoworx123
What is the best way to make sure that our site is also picked up via search engine searches.0 -
Shutting down a site, where do I 301 it?
I'm working with a few international sites that we are going to collapse into one main site. Our current plan is to 301 the 4 other sites into our main site home page. Is this ok? Is there a better way to do this? Thanks
Technical SEO | | MarloSchneider0 -
What is the best way to remove and fight back backlink spam?
Removing low quality and spam backlinks. What is the most effective clean-up process?
Technical SEO | | matti_wilson0 -
Limits to 301 in htaccess?
I'm about to launch a redesign of my company's main website, and we've updated most of the URLs to be more user friendly and SEO optimized. I've just finished editing my spreadsheet, and see that I'll need to implement 244 redirects. My question is: Are there performance issues with loading your .htaccess file up with almost 250 301 redirect commands? I've heard a bloated htaccess file can really slow down apache, should I be approaching this a different way, maybe with php?
Technical SEO | | AdoptionHelp0 -
301 Redirect Domain or 301 Redirect Domain + Interior Pages
Hello - My company acquired another company in our industry and our IT team immediately set up the acquired companies domain name as a an alias to our site. This created a duplicate version of our website under another domain name and Google started ranking interior pages from the aliased acquired site for several top keywords that were previously held by our real site. Should we 301 redirect just the top level domain name of the acquired site to the real site or 301 redirect the top level domain name and the interior pages on the acquired site to help ensure that our real domain will take back the rankings it once had? Thanks!
Technical SEO | | Room2140