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
      • MozCon
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Digital Marketers
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • 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.

      • MozCon

        Save on Early Bird tickets and join us in London or New York City

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Digital Marketers

        Simplify SEO tasks to save time and grow your traffic.

      • 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.

      • 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
    7475
    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

      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

        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

          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

            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 Reply Quote 0
            • iamgreenminded
              iamgreenminded last edited by

              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 Reply Quote 0
              • kwoolf
                kwoolf last edited by

                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
                • First post
                  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

                • brandonegroup

                  Removing the Trailing Slash in Magento

                  Hi guys, We have noticed trailing slash vs non-trailing slash duplication on one of our sites. Example:
                  Duplicate: https://www.example.com.au/living/
                  Preferred: https://www.example.com.au/living So, SEO-wise, we suggested placing a canonical tag on all trailing slash pointing to non-trailing slash. However, devs have advised against removing the trailing slash from some URLs with a blanket rule, as this may break functionality in Magento that depends on the trailing slash. The full site would need to be tested after implementing a blanket rewrite rule. Is any other way to address this trailing slash duplication issue without breaking anything in Magento? Keen to hear from you guys. Cheers,

                  Intermediate & Advanced SEO | | brandonegroup
                  0
                • Virginia-Girtz

                  How can I avoid duplicate content for a new landing page which is the same as an old one?

                  Hello mozers! I have a question about duplicate content for you... One on my clients pages have been dropping in search volume for a while now, and I've discovered it's because the search term isn't as popular as it used to be. So... we need to create a new landing page using a more popular search term. The page which is losing traffic is based on the search query "Can I put a solid roof on my conservatory" this only gets 0-10 searches per month according to the keyword explorer tool. However, if we changed this to "replacing conservatory roof with solid roof" this gets up to 500 searches per month. Muuuuch better! The issue is, I don't want to close down and re-direct the old page because it's got a featured snippet and sits in position 1. So I'd like to create another page instead... however, as the two are effectively the same content, I would then land myself in a duplicate content issue. If I were to put a rel="canonical" tag in the original "can I put a solid roof...." page but say the master page is now the new one, would that get around the issue?

                  Intermediate & Advanced SEO | | Virginia-Girtz
                  0
                • 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 | | ICON_Malta
                  0
                • Ullamalm

                  Ranking 2 pages on the same domain in the same SERP

                  I thought it was generally said that Google will favour 1 page per domain for a particular SERP, but I have seen examples where that is not the case (i.e. Same domain is ranking 2 different pages on the 1st page of the SERPs...) Are there any "tricks" to taking up 2 first page SERP positions, or am I mistaken that this doesn't always happen?

                  Intermediate & Advanced SEO | | Ullamalm
                  0
                • MyPetWarehouse

                  Duplicate Content through 'Gclid'

                  Hello, We've had the known problem of duplicate content through the gclid parameter caused by Google Adwords. As per Google's recommendation - we added the canonical tag to every page on our site so when the bot came to each page they would go 'Ah-ha, this is the original page'. We also added the paramter to the URL parameters in Google Wemaster Tools. However, now it seems as though a canonical is automatically been given to these newly created gclid pages; below https://www.google.com.au/search?espv=2&q=site%3Awww.mypetwarehouse.com.au+inurl%3Agclid&oq=site%3A&gs_l=serp.3.0.35i39l2j0i67l4j0i10j0i67j0j0i131.58677.61871.0.63823.11.8.3.0.0.0.208.930.0j3j2.5.0....0...1c.1.64.serp..8.3.419.nUJod6dYZmI Therefore these new pages are now being indexed, causing duplicate content. Does anyone have any idea about what to do in this situation? Thanks, Stephen.

                  Intermediate & Advanced SEO | | MyPetWarehouse
                  0
                • BobAnderson

                  Tabs and duplicate content?

                  We own this site http://www.discountstickerprinting.co.uk/ and just a little concerned as I right clicked open in new tab on the tab content section and it went to a new page For example if you right click on the price tab and click open in new tab you will end up with the url
                  http://www.discountstickerprinting.co.uk/#tabThree Does this mean that our content is being duplicated onto another page? If so what should I do?

                  Intermediate & Advanced SEO | | BobAnderson
                  0
                • team_tic

                  International SEO - cannibalisation and duplicate content

                  Hello all, I look after (in house) 3 domains for one niche travel business across three TLDs: .com .com.au and co.uk and a fourth domain on a co.nz TLD which was recently removed from Googles index. Symptoms: For the past 12 months we have been experiencing canibalisation in the SERPs (namely .com.au being rendered in .com) and Panda related ranking devaluations between our .com site and com.au site. Around 12 months ago the .com TLD was hit hard (80% drop in target KWs) by Panda (probably) and we began to action the below changes. Around 6 weeks ago our .com TLD saw big overnight increases in rankings (to date a 70% averaged increase). However, almost to the same percentage we saw in the .com TLD we suffered significant  drops in our .com.au rankings. Basically Google seemed to switch its attention from .com TLD to the .com.au TLD. Note: Each TLD is over 6 years old, we've never proactively gone after links (Penguin) and have always aimed for quality in an often spammy industry. **Have done: ** Adding HREF LANG markup to all pages on all domain Each TLD uses local vernacular e.g for the .com site is American Each TLD has pricing in the regional currency Each TLD has details of the respective local offices, the copy references the lacation, we have significant press coverage in each country like The Guardian for our .co.uk site and Sydney Morning Herlad for our Australia site Targeting each site to its respective market in WMT Each TLDs core-pages (within 3 clicks of the primary nav) are 100% unique We're continuing to re-write and publish unique content to each TLD on a weekly basis As the .co.nz site drove such little traffic re-wrting we added no-idex and the TLD has almost compelte dissapread (16% of pages remain) from the SERPs. XML sitemaps Google + profile for each TLD **Have not done: ** Hosted each TLD on a local server Around 600 pages per TLD are duplicated across all TLDs (roughly 50% of all content). These are way down the IA but still duplicated. Images/video sources from local servers Added address and contact details using SCHEMA markup Any help, advice or just validation on this subject would be appreciated! Kian

                  Intermediate & Advanced SEO | | team_tic
                  1
                • 360eight-SEO

                  News sites & Duplicate content

                  Hi SEOMoz I would like to know, in your opinion and according to 'industry' best practice, how do you get around duplicate content on a news site if all news sites buy their "news" from a central place in the world? Let me give you some more insight to what I am talking about. My client has a website that is purely focuses on news. Local news in one of the African Countries to be specific. Now, what we noticed the past few months is that the site is not ranking to it's full potential. We investigated, checked our keyword research, our site structure, interlinking, site speed, code to html ratio you name it we checked it. What we did pic up when looking at duplicate content is that the site is flagged by Google as duplicated, BUT so is most of the news sites because they all get their content from the same place. News get sold by big companies in the US (no I'm not from the US so cant say specifically where it is from) and they usually have disclaimers with these content pieces that you can't change the headline and story significantly, so we do have quite a few journalists that rewrites the news stories, they try and keep it as close to the original as possible but they still change it to fit our targeted audience - where my second point comes in. Even though the content has been duplicated, our site is more relevant to what our users are searching for than the bigger news related websites in the world because we do hyper local everything. news, jobs, property etc. All we need to do is get off this duplicate content issue, in general we rewrite the content completely to be unique if a site has duplication problems, but on a media site, im a little bit lost. Because I haven't had something like this before. Would like to hear some thoughts on this. Thanks,
                  Chris Captivate

                  Intermediate & Advanced SEO | | 360eight-SEO
                  0

                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.