The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

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

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Intermediate & Advanced SEO
    4. After adding a ssl certificate to my site I encountered problems with duplicate pages and page titles

    After adding a ssl certificate to my site I encountered problems with duplicate pages and page titles

    Intermediate & Advanced SEO
    4 3 168
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LovingatYourBest
      LovingatYourBest last edited by

      Hey everyone!

      After adding a ssl certificate to my site it seems that every page on my site has duplicated it's self. I think that is because it has combined the www.domainname.com and domainname.com. I would really hate to add a rel canonical to every page to solve this issue. I am sure there is another way but I am not sure how to do it. Has anyone else ran into this problem and if so how did you solve it?

      Thanks and any and all ideas are very appreciated.

      1 Reply Last reply Reply Quote 0
      • donford
        donford last edited by

        HI Travis

        Yes, you can use your .htaccess file to fix this. (This file should be located in your home directory)

        A simple example would be

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

        What this does is looks for any request for non-www urls, if found it 301 redirects it to the www version of the page.

        Hope this helps,

        Don

        LovingatYourBest 1 Reply Last reply Reply Quote 2
        • BlueprintMarketing
          BlueprintMarketing last edited by

          **`Don is right
          If on Nginx use`**
          
          <code>server {
          server_name [example.com](http://example.com/);
          rewrite ^/(.*) [https://example.com/$1](https://example.com/$1) permanent;
          }</code>
          
          <code>server { listen 80; server_name my.domain.com; return 301 https://$server_name$request_uri; } server { listen 443 ssl; server_name my.domain.com; [....] }</code>
          
          <code>server { listen 80; server_name yourdomain.com www.yourdomain.com; return 301 https://$server_name$request_uri; } server { listen 443 ssl spdy; server_name yourdomain.com www.yourdomain.com; ssl on; ssl_certificate /var/www.yourdomain.com/cert/ssl-bundle.crt; ssl_certificate_key /var/www/yourdomain.com/cert/yourdomain.com.key; access_log /var/log/nginx/yourdomain.com.access.log rt_cache; error_log /var/log/nginx/yourdomain.com.error.log; root /var/www/yourdomain.com./htdocs; index index.php index.htm index.html; include common/wpfc.conf; include common/wpcommon.conf; include common/locations.conf; }</code> 
          
          `https://christiaanconover.com/blog/how-to-redirect-http-to-https-in-nginx`
          

          https://moz.com/learn/seo/redirection

          https://wp-mix.com/htaccess-redirect-http-to-https/

          https://www.digitalocean.com/community/questions/http-https-redirect-positive-ssl-on-nginx

          1 Reply Last reply Reply Quote 0
          • LovingatYourBest
            LovingatYourBest @donford last edited by

            Hi Donford,

            Excuse the delay. We have been very busy but we are working on updating our .htaccess file. Thank you for the quick response. We will let you know if it resolves our issues.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • I added an SSL certificate this morning and now I noticed duplicate content
              Chris661
              Chris661
              0
              9
              308

            • On 1 of our sites we have our Company name in the H1 on our other site we have the page title in our H1 - does anyone have any advise about the best information to have in the H1, H2 and Page Tile
              Kenn_Gold
              Kenn_Gold
              0
              5
              601

            • Duplicate page wordpress title
              evolvingSEO
              evolvingSEO
              1
              7
              175

            • Big problem with duplicate page content
              ana_g
              ana_g
              0
              4
              106

            • Similar page titles but not quite duplicate
              MikeRoberts
              MikeRoberts
              0
              2
              239

            • Duplicate Page Title/Content Issues on Product Review Submission Pages
              PartyStore
              PartyStore
              0
              7
              747

            • Duplicate Page Title problems with Product Catalogues (Categories, Subcategories etc.)
              KeriMorgret
              KeriMorgret
              0
              6
              608

            • Duplicate page content and duplicate pate title
              RyanKent
              RyanKent
              0
              3
              555

            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
            • Digital Marketers
            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 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
            • Accessibility
            • Terms of Use
            • Privacy