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
-
Best way to fix duplicate content issues
Another question for the Moz Community. One of my clients has 4.5k duplicate content issues. For example: http://www.example.co.uk/blog and http://www.example.co.uk/index.php?route=blog/blog/listblog&year=2017. Most of the issues are coming from product pages. My initial thoughts are to set up 301 redirects in the first instance and if the issue persists, add canonical tags. Is this the best way of tackling this issue?
Technical SEO | | Laura-EMC0 -
What is the best way to handle Product URLs which prepopulate options?
We are currently building a new site which has the ability to pre-populate product options based on parameters in the URL. We have done this so that we can send individual product URLs to google shopping. I don't want to create lots of duplicate pages so I was wondering what you thought was the best way to handle this? My current thoughts are: 1. Sessions and Parameters
Technical SEO | | moturner
On-site product page filters populate using sessions so no parameters are required on-site but options can still be pre-populated via parameters (product?colour=blue&size=100cm) if the user reaches the site via google shopping. We could also add "noindex, follow" to the pages with parameters and a canonical tag to the page without parameters. 2. Text base Parameters
Make the parameters in to text based URLs (product/blue/100cm/) and still use "noindex, follow" meta tag and add a canonical tag to the page without parameters. I believe this is possibly the best solution as it still allows users to link to and share pre-populated pages but they won't get indexed and the link juice would still pass to the main product page. 3. Standard Parmaters
After thinking more today I am considering the best way may be the simplest. Simply using standard parameters (product?colour=blue&size=100cm) so that I can then tell google what they do in webmaster tools and also add "noindex, follow" to the pages with parameters along with the canonical tag to the page without parameters. What do you think the best way to handle this would be?0 -
301 Redirects
Hi, I have switched my site from a http .co.uk site to a https .com site. I have set a 301 redirect in the .htaccess file pointing all traffic going to the original .co.uk site to go to the new https: RewriteEngine on
Technical SEO | | imoprojects
RewriteCond %{HTTP_HOST} ^up-bus.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.up-bus.co.uk$
RewriteRule ^(.*)$ "https://www.up-bus.com/$1" [R=301,L] however when i search in google for keywords the original .co.uk site is still registering in search, is there something else I am required to do to tell google to use the new https site instead? Do i need to do redirects for every page, or is what I have done above sufficient? Hope you can help, I am struggling with getting our site to register on google search, any advice greatly welcome Thanks in advance, Ian0 -
Need help with rel canonical!
I have a client who's MOZ crawl is coming back with 62 "notices" about rel canonical. Is this bad? On the report, it lists the url, then "Tag Value" as the home page.....what does this mean exactly? Are they pointing all the pages to the home page? I think I have 301 and rel can confused....
Technical SEO | | cschwartzel0 -
301 redirect chains
Hi everyone, I've had my site for a while now and have changed the structure a number of times. I'm confident my 301's work well and am not concerned about dead ends on my site. My question is, is there a way to find 301 redirect chains? i.e. can I export my link data from webmaster tools and run it through some software that tells me how many steps my 301's are taking to get to the final page? I don't know for sure that there are long 301 chains in my link structure, but I have a suspicion and it's very hard to check by going through them manually. Thanks in advance Will
Technical SEO | | madegood0 -
Should I change a 301 redirect?
I recently moved all the content from an old site to a new site on a new domain. I lost a significant amount of traffic as a result. There are 301 redirects for every page on the old site. Generally, these point to the same content as was on the relevant page of the old site. However, the 301 redirect for the homepage on the old site points to the homepage on the new site, not to the content from the old site homepage. I'm wondering whether to change the 301 to point at the content from the old site homepage. Any advice would be much appreciated.
Technical SEO | | seqal0 -
Where to get expert SEO help?
I joined SEOmoz knowing very little about SEO (it turns out even less than I thought!) I signed up because my business website that had be ranking very well for years made a fast and furious fall to the purgatory of page 2, 3, whatever. We'll I've definitely learned a lot and made a several changes that have helped. Specifically link building (directory submissions) and eliminating duplicate content. But we're still far below where we used to be and I've done everything I can do without making a career change to SEO. I've hired a few offshore SEOs to help but they have all failed to live up to their promises. So, I would love to find a GOOD SEO that can 1. Fix the remaining on-page technical issues in our CMS website (Business Catalyst), and 2. help us develop an SEO strategy for the next year. (I prefer not to post the name of the website for competitive reasons) Our keywords are really not very competitive at all due to the uniqueness of the business. Where should I look for help? Thanks
Technical SEO | | Placeboo0 -
301-redirect
Hi My website is fairly new and i wasnt aware of the difference btw 'website.com' and 'www.website.com' when i started up. It doesnt matter which one i use as long as i am consistent right ? Most of my ingoing links are to mainpage on 'website.com'. I have som ingoing links to 'www.website.com' but also some to 'www.website.com/brandname'. is it enough to 301-redir 'www.website.com' to 'website.com' or does it need to be done on several levels ? I need to have someone do the redirect for me - how can i check its working when its done ? Dan Lærum
Technical SEO | | danlae0