undefined
Skip to content
Moz logo Menu open Menu close
  • Products
    • Moz Pro
    • Moz Pro Home
    • Moz Local
    • Moz Local Home
    • STAT
    • Moz API
    • Moz API Home
    • Compare SEO Products
    • Moz Data
  • Free SEO Tools
    • Domain Analysis
    • Keyword Explorer
    • Link Explorer
    • Competitive Research
    • MozBar
    • More Free SEO Tools
  • Learn SEO
    • Beginner's Guide to SEO
    • SEO Learning Center
    • Moz Academy
    • SEO Q&A
    • Webinars, Whitepapers, & Guides
  • Blog
  • Why Moz
    • Agency Solutions
    • Enterprise Solutions
    • Small Business Solutions
    • Case Studies
    • The Moz Story
    • New Releases
  • Log in
  • Log out
  • Products
    • Moz Pro

      Your all-in-one suite of SEO essentials.

    • Moz Local

      Raise your local SEO visibility with complete local SEO management.

    • STAT

      SERP tracking and analytics for enterprise SEO experts.

    • Moz API

      Power your SEO with our index of over 44 trillion links.

    • Compare SEO Products

      See which Moz SEO solution best meets your business needs.

    • Moz Data

      Power your SEO strategy & AI models with custom data solutions.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Free SEO Tools
    • Domain Analysis

      Get top competitive SEO metrics like DA, top pages and more.

    • Keyword Explorer

      Find traffic-driving keywords with our 1.25 billion+ keyword index.

    • Link Explorer

      Explore over 40 trillion links for powerful backlink data.

    • Competitive Research

      Uncover valuable insights on your organic search competitors.

    • MozBar

      See top SEO metrics for free as you browse the web.

    • More Free SEO Tools

      Explore all the free SEO tools Moz has to offer.

    NEW Keyword Suggestions by Topic
    Moz Pro

    NEW Keyword Suggestions by Topic

    Learn more
  • Learn SEO
    • Beginner's Guide to SEO

      The #1 most popular introduction to SEO, trusted by millions.

    • SEO Learning Center

      Broaden your knowledge with SEO resources for all skill levels.

    • On-Demand Webinars

      Learn modern SEO best practices from industry experts.

    • How-To Guides

      Step-by-step guides to search success from the authority on SEO.

    • Moz Academy

      Upskill and get certified with on-demand courses & certifications.

    • SEO Q&A

      Insights & discussions from an SEO community of 500,000+.

    Unlock flexible pricing & new endpoints
    Moz API

    Unlock flexible pricing & new endpoints

    Find your plan
  • Blog
  • Why Moz
    • Small Business Solutions

      Uncover insights to make smarter marketing decisions in less time.

    • Agency Solutions

      Earn & keep valuable clients with unparalleled data & insights.

    • Enterprise Solutions

      Gain a competitive edge in the ever-changing world of search.

    • The Moz Story

      Moz was the first & remains the most trusted SEO company.

    • Case Studies

      Explore how Moz drives ROI with a proven track record of success.

    • New Releases

      Get the scoop on the latest and greatest from Moz.

    Surface actionable competitive intel
    New Feature

    Surface actionable competitive intel

    Learn More
  • Log in
    • Moz Pro
    • Moz Local
    • Moz Local Dashboard
    • Moz API
    • Moz API Dashboard
    • Moz Academy
  • Avatar
    • Moz Home
    • Notifications
    • Account & Billing
    • Manage Users
    • Community Profile
    • My Q&A
    • My Videos
    • Log Out

The Moz Q&A Forum

  • Forum
  • Questions
  • Users
  • Ask the Community

Welcome to the Q&A Forum

Browse the forum for helpful insights and fresh discussions about all things SEO.

  1. Home
  2. SEO Tactics
  3. Intermediate & Advanced SEO
  4. Trailing Slashes for Magento CMS pages - 2 URLS - Duplicate content

Moz Q&A is closed.

After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

Trailing Slashes for Magento CMS pages - 2 URLS - Duplicate content

Intermediate & Advanced SEO
3
6
7.5k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as question
Log in to reply
This topic has been deleted. Only users with question management privileges can see it.
  • iamgreenminded
    iamgreenminded last edited by Oct 4, 2015, 1:14 AM

    Hello,

    Can anyone help me find a solution to Fixing and Creating Magento CMS pages to only use one URL  and not two URLS?

    www.domain.com/testpage

    www.domain.com/testpage/

    I found a previous article that applies to my issue, which is using htaccess to redirect request for pages in magento 301 redirect to slash URL from the non-slash URL.  I dont understand the syntax fully in htaccess , but I used this code below.

    This code below fixed the CMS page redirection but caused issues on other pages, like all my categories and products with this error:

    "This webpage has a redirect loop

    ERR_TOO_MANY_REDIRECTS"

    Assuming you're running at domain root.  Change to working directory if needed.

    RewriteBase /

    # www check

    If you're running in a subdirectory, then you'll need to add that in

    to the redirected url (http://www.mydomain.com/subdirectory/$1

    RewriteCond %{HTTP_HOST} !^www. [NC]
    RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]

    Trailing slash check

    Don't fix direct file links

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_URI} !(.)/$
    RewriteRule ^(.
    )$ $1/ [L,R=301]

    Finally, forward everything to your front-controller (index.php)

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* index.php [QSA,L]

    1 Reply Last reply Reply Quote 0
    • iamgreenminded
      iamgreenminded last edited by Oct 6, 2015, 1:25 AM Oct 6, 2015, 1:25 AM

      301's are not difficult for me, but handling the code for a logic to re-route requests for "URL" to "URL/" is something I dont know how to do. I can manually 301 or rel canonical my CMS pages on Magento everytime, but that defeats the purpose or the automation in htaccess I am trying to get working.

      thanks

      1 Reply Last reply Reply Quote 0
      • iamgreenminded
        iamgreenminded @kwoolf last edited by Oct 6, 2015, 1:29 AM Oct 6, 2015, 1:22 AM

        Thank You Kevin.

        This is almost the default Magento htaccess file(out of the box), I think I had a couple entries to fix a couple other issues, the code I just added that isnt working is in the middle of the htaccess, its commented starting with this: ** "## slash removal re-write done by ALEX MEADE for iamgreenminded.com**

        uncomment these lines for CGI mode

        make sure to specify the correct cgi php binary file name

        it might be /cgi-bin/php-cgi

        Action php5-cgi /cgi-bin/php5-cgi

        AddHandler php5-cgi .php

        ############################################

        GoDaddy specific options

        Options -MultiViews

        you might also need to add this line to php.ini

        cgi.fix_pathinfo = 1

        if it still doesn't work, rename php.ini to php5.ini

        ############################################

        this line is specific for 1and1 hosting

        #AddType x-mapp-php5 .php
        #AddHandler x-mapp-php5 .php

        ############################################

        default index file

        DirectoryIndex index.php

        ############################################

        adjust memory limit

        php_value memory_limit 64M

        php_value memory_limit 256M
        php_value max_execution_time 18000

        ############################################

        disable magic quotes for php request vars

        php_flag magic_quotes_gpc off

        ############################################

        disable automatic session start

        before autoload was initialized

        php_flag session.auto_start off

        ############################################

        enable resulting html compression

        #php_flag zlib.output_compression on

        ###########################################

        disable user agent verification to not break multiple image upload

        php_flag suhosin.session.cryptua off

        ###########################################

        turn off compatibility with PHP4 when dealing with objects

        php_flag zend.ze1_compatibility_mode Off

        <ifmodule mod_security.c="">###########################################

        disable POST processing to not break multiple image upload</ifmodule>

        SecFilterEngine Off
        SecFilterScanPOST Off

        ############################################

        enable apache served files compression

        http://developer.yahoo.com/performance/rules.html#gzip

        Insert filter on all content

        ###SetOutputFilter DEFLATE

        Insert filter on selected content types only

        #AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript

        Netscape 4.x has some problems...

        #BrowserMatch ^Mozilla/4 gzip-only-text/html

        Netscape 4.06-4.08 have some more problems

        #BrowserMatch ^Mozilla/4.0[678] no-gzip

        MSIE masquerades as Netscape, but it is fine

        #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

        Don't compress images

        #SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary

        Make sure proxies don't deliver the wrong content

        #Header append Vary User-Agent env=!dont-vary

        ############################################

        make HTTPS env vars available for CGI mode

        SSLOptions StdEnvVars

        ############################################

        enable rewrites

        Options +FollowSymLinks
        RewriteEngine on

        ############################################

        slash removal re-write done by ALEX MEADE for iamgreenminded.com

        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_URI} !(.)/$
        RewriteCond %{REQUEST_FILENAME} !.(gif|jpg|png|jpeg|css|js)$ [NC]
        RewriteRule ^(.
        )$ http://%{HTTP_HOST}/$1/ [L,R=301]
        ############################################

        ############################################

        you can put here your magento root folder

        path relative to web root

        #RewriteBase /magento/

        ############################################

        uncomment next line to enable light API calls processing

        RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]

        ############################################

        rewrite API2 calls to api.php (by now it is REST only)

        RewriteRule ^api/rest api.php?type=rest [QSA,L]

        ############################################

        workaround for HTTP authorization

        in CGI environment

        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

        ############################################

        TRACE and TRACK HTTP methods disabled to prevent XSS attacks

        RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
        RewriteRule .* - [L,R=405]

        ############################################

        redirect for mobile user agents

        #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.$
        #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
        #RewriteRule ^(.
        )$ /mobiledirectoryhere/ [L,R=302]

        ############################################

        always send 404 on missing files in these folders

        RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

        ############################################

        never rewrite for existing files, directories and links

        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-l

        ############################################

        rewrite everything else to index.php

        RewriteRule .* index.php [L]

        ############################################

        Prevent character encoding issues from server overrides

        If you still have problems, use the second line instead

        AddDefaultCharset Off
        #AddDefaultCharset UTF-8

        ############################################

        Add default Expires header

        http://developer.yahoo.com/performance/rules.html#expires

        ExpiresDefault "access plus 1 year"

        ############################################

        By default allow all access

        Order allow,deny
        Allow from all

        ###########################################

        Deny access to release notes to prevent disclosure of the installed Magento version

        <files release_notes.txt="">order allow,deny
        deny from all</files>

        ############################################

        If running in cluster environment, uncomment this

        http://developer.yahoo.com/performance/rules.html#etags

        #FileETag none

        Permanent URL redirect - generated by www.rapidtables.com

        Redirect 301 /thebirdword http://www.thebirdword.com

        1 Reply Last reply Reply Quote 0
        • kwoolf
          kwoolf @iamgreenminded last edited by Oct 5, 2015, 9:30 AM Oct 5, 2015, 9:30 AM

          You probably have other redirects in your .htaccess and possibly in your website code. The order of your rewrites is also important. Publish your Apache config and I'll take a look.

          FYI, there are better resources for technical issue than MOZ. Most here are not developers/IT specialists; we're more like SEO strategists and business managers.

          iamgreenminded 1 Reply Last reply Oct 6, 2015, 1:22 AM Reply Quote 0
          • iamgreenminded
            iamgreenminded last edited by Oct 5, 2015, 2:57 AM Oct 5, 2015, 2:56 AM

            RewriteEngine On
            RewriteBase /
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_URI} !example.php
            RewriteCond %{REQUEST_URI} !(.)/$
            RewriteRule ^(.
            )$ http://domain.com/$1/ [L,R=301]

            I have found both of the articles you linked here, nothing is working - any code I try gives me the same error on most of my pages:

            "This webpage has a redirect loop

            ERR_TOO_MANY_REDIRECTS"

            Still need a fix for this

            thanks

            kwoolf 1 Reply Last reply Oct 5, 2015, 9:30 AM Reply Quote 0
            • kwoolf
              kwoolf last edited by Oct 4, 2015, 9:28 AM Oct 4, 2015, 9:27 AM

              Yes, server redirects are necessary. Try these solutions to see which one works for you:

              http://ralphvanderpauw.com/seo/how-to-301-redirect-a-trailing-slash-in-htaccess/

              http://enarion.net/web/htaccess/trailing-slash/

              You might want to consider moving to Nginx. You'll notice amazing speed and stability improvement with Nginx, Redis Session Cache, Memcached, OpCache, Ngx_pagespeed, and Magento Cache Storage Management. I can help much more with Nginx redirects and conf files--I gave up Apache years ago. Sorry I couldn't be of more help.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 out of 6
              • First post
                1/6
                Last post

              Got a burning SEO question?

              Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


              Start my free trial


              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.

              • See all categories

              Related Questions

              • ICON_Malta

                Should I switch from trailing slash to no trailing slash?

                I have a website which has had trailing slashes added to the URLs by 301 redirects for over 3 years. However, the custom CMS does not allow navigation links to have trailing slashes. This is resulting in 301s every time a user clicks a navigation link. The site ranks fairy well for some moderately competitive keywords. If you were in my shoes, would you remove the forced trailing slash redirect in the .htaccess and replace it with a trailing slash removal redirect, or would you leave it like it is? Thanks,
                James p.s. the CMS also doesn't allow canonicals.

                Intermediate & Advanced SEO | Jul 5, 2018, 3:30 PM | ICON_Malta
                0
              • jayoliverwright

                Duplicate URLs ending with #!

                Hi guys, Does anyone know why a site can contain duplicate URLs ending with hastag & exclamation mark e.g. https://site.com.au/#! We are finding a lot of these URLs (as duplicates) and i was wondering what they are from developer standpoint? And do you think it's worth the time and effort adding a rel canonical tag or 301 to these URLs eventhough they're not getting indexed by Google? Cheers, Chris

                Intermediate & Advanced SEO | Nov 2, 2015, 5:34 PM | jayoliverwright
                0
              • ennovators

                Replace dynamic paramenter URLs with static Landing Page URL - faceted navigation

                Hi there, got a quick question regarding faceted navigation. If a specific filter (facet) seems to be quite popular for visitors. Does it make sense to replace a dynamic URL e.x http://www.domain.com/pants.html?a_type=239 by a static, more SEO friendly URL e.x http://www.domain.com/pants/levis-pants.html by creating a proper landing page for it. I know, that it is nearly impossible to replace all variations of this parameter URLs by static ones but does it generally make sense to do this for the most popular facets choose by visitors. Or does this cause any issues? Any help is much appreciated. Thanks a lot in advance

                Intermediate & Advanced SEO | Jul 9, 2015, 5:26 PM | ennovators
                0
              • J_Sinclair

                How to deal with URLs and tabbed content

                Hi All, We're currently redesigning a website for a new home developer and we're trying to figure out the best way to deal with tabbed content in the URL structure. The design of the site at the moment will have a page for a development and within that you can select your house type, then when on the house type page there will be tabs displayed for the user to see things like the plot map, availability and pricing, specifications, etc. The way our development team are looking at handling this is for the URL to use a hashtag or a query string at the end of it so we can still land users on these specific tabs for PPC for example. My question is really, has anyone had any experience with this? Any recommendations on how to best display the urls for SEO? Thanks

                Intermediate & Advanced SEO | Aug 1, 2014, 1:02 PM | J_Sinclair
                0
              • Marketing.SCG

                Magento: URLs for Products in Multiple Categories

                I am working in Magento to build out a large e-commerce site with several thousand products. It's a great platform, but I have run into the issue of what it does to URLs when you put a product into multiple categories. Basically, "a book" in two categories would make two URLs for one product: 1) /books/a-book 2) author-name/a-book So, I need to come up with a solution for this. It seems I have two options: Found this from a Magento SEO article: 'Magento gives you the ability to add the name of categories to path for product URL's. Because Magento doesn't support this functionality very well - it creates duplicate content issues - it is a very good idea to disable this. To do this, go to System => Configuration => Catalog => Search Engine Optimization and set "Use categories path for product URL's to "no".' This would solve the issues and be a quick fix, but I think it's a double edged sword, because then we lose the SEO value of our well named categories being in the URL. Use Canonical tags. To be fair, I'm not even sure this is possible. Even though it is creating different URLs and, thus, poses a risk of "duplicate content" being crawled, there really is only one page on the admin side. So, I can't go to all of the "duplicate" pages and put a canonical tag, because those duplicate pages don't really exist on the back-end. Does that make sense? After typing this out, it seems like the best thing to do probably will be to just turn off categories in the URL from the admin side. However, I'd still love any input from the community on this. Thanks!

                Intermediate & Advanced SEO | Mar 28, 2012, 6:08 PM | Marketing.SCG
                0
              • WebMarketingandDesign

                Multiple URLs for the same page

                I am working with a client and recently discovered that they have several URLs that go to the same page. http://www.maps.com/FunFacts.aspx
                http://www.maps.com/funfacts.aspx
                http://www.maps.com/FunFacts.aspx?nav=FF
                http://www.maps.com/FunFacts.aspx?nav=FS
                http://www.maps.com/funfacts.aspx?nav=FF
                http://www.maps.com/funfacts.aspx?nav=ffhttp://www.maps.com/FunFacts.aspx?nav=MShttp://www.maps.com/funfacts.aspx?nav=
                http://www.maps.com/FunFacts.aspx?nav=FF#
                http://www.maps.com/FunFacts
                http://www.maps.com/funfacts.aspx?.nav=FF I am afraid this is happening all over the site. So, my question is: Is this hurting the SEO and how? If so what is the best way to go about fixing this problem? Thanks for your help!

                Intermediate & Advanced SEO | Nov 17, 2011, 11:15 PM | WebMarketingandDesign
                0
              • CarlS

                Capitals in url creates duplicate content?

                Hey Guys, I had a quick look around however I couldn't find a specific answer to this. Currently, the SEOmoz tools come back and show a heap of duplicate content on my site. And there's a fair bit of it. However, a heap of those errors are relating to random capitals in the urls. for example. "www.website.com.au/Home/information/Stuff" is being treated as duplicate content of "www.website.com.au/home/information/stuff" (Note the difference in capitals). Anyone have any recommendations as to how to fix this server side(keeping in mind it's not practical or possible to fix all of these links) or to tell Google to ignore the capitalisation? Any help is greatly appreciated. LM.

                Intermediate & Advanced SEO | Jul 24, 2015, 10:50 AM | CarlS
                0
              • joseph.chambers

                Duplicate Content | eBay

                My client is generating templates for his eBay template based on content he has on his eCommerce platform. I'm 100% sure this will cause duplicate content issues. My question is this.. and I'm not sure where eBay policy stands with this but adding the canonical tag to the template.. will this work if it's coming from a different page i.e. eBay? Update: I'm not finding any information regarding this on the eBay policy's: http://ocs.ebay.com/ws/eBayISAPI.dll?CustomerSupport&action=0&searchstring=canonical So it does look like I can have rel="canonical" tag in custom eBay templates but I'm concern this can be considered: "cheating" since rel="canonical is actually a 301 but as this says: http://googlewebmastercentral.blogspot.com/2009/12/handling-legitimate-cross-domain.html it's legitimately duplicate content. The question is now: should I add it or not? UPDATE seems eBay templates are embedded in a iframe but the snap shot on google actually shows the template. This makes me wonder how they are handling iframes now. looking at http://www.webmaster-toolkit.com/search-engine-simulator.shtml does shows the content inside the iframe. Interesting. Anyone else have feedback?

                Intermediate & Advanced SEO | Dec 9, 2014, 11:02 AM | joseph.chambers
                1

              Get started with Moz Pro!

              Unlock the power of advanced SEO tools and data-driven insights.

              Start my free trial
              Products
              • Moz Pro
              • Moz Local
              • Moz API
              • Moz Data
              • STAT
              • Product Updates
              Moz Solutions
              • SMB Solutions
              • Agency Solutions
              • Enterprise Solutions
              Free SEO Tools
              • Domain Authority Checker
              • Link Explorer
              • Keyword Explorer
              • Competitive Research
              • Brand Authority Checker
              • Local Citation Checker
              • MozBar Extension
              • MozCast
              Resources
              • Blog
              • SEO Learning Center
              • Help Hub
              • Beginner's Guide to SEO
              • How-to Guides
              • Moz Academy
              • API Docs
              About Moz
              • About
              • Team
              • Careers
              • Contact
              Why Moz
              • Case Studies
              • Testimonials
              Get Involved
              • Become an Affiliate
              • MozCon
              • Webinars
              • Practical Marketer Series
              • MozPod
              Connect with us

              Contact the Help team

              Join our newsletter
              Moz logo
              © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
              • Accessibility
              • Terms of Use
              • Privacy

              Looks like your connection to Moz was lost, please wait while we try to reconnect.