After adding a ssl certificate to my site I encountered problems with duplicate pages and page titles
-
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.
-
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.
-
**`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
-
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
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
-
Duplicate URLs on eCommerce site caused by parameters
Hi there, We have a client with a large eCommerce site with about 1500 duplicate URLs caused by the parameters in the URLs (such as the sort parameter where the list of products are then sorted by price, age etc.) Example: www.example.com/cars/toyota First duplicate URL: www.example.com/cars/toyota?sort=price-ascending Second duplicate URL: www.example.com/cars/toyota?sort=price-descending Third duplicate URL: www.example.com/cars/toyota?sort=age-descending Originally we had advised to add a robots.txt file to block search engines from crawling the URLs with parameters but this hasn't been done. My question: If we add the robots.txt now and exclude all URLs with filters - how long will it take for Google to disregard the duplicate URLs? We could ask the developers to add canonical tags to all the duplicates but these are about 1500... Thanks in advance for any advice!
Intermediate & Advanced SEO | | Gabriele_Layoutweb0 -
Duplicate title tags due to ?_escaped_fragment_=
Duplicate title tags due to /?escaped_fragment= in the serps, it look like this http://www.site.com/25621/post-name/#! http://www.site.com/25621/post-name/ Does anyone know what the best fix is for this and does this affect the sites performance. Regards T
Intermediate & Advanced SEO | | Taiger0 -
Page Title Tag operands , - |
Hi, Anyone have any good suggestions about using commas, hyphens, vertical bar in the title tag and how it affects rankings? Thanks.
Intermediate & Advanced SEO | | bjs20100 -
Duplicating a site on 2 different ccTLDs and using cannonical
Hello, We have a site that sells a certain product on www.example.com. This site contains thousands of pages including a whole section of well written content that we invested a lot of money in making. The site ranks on many KWs both brand and non-brand related. SERPs include the Homepage and many of the articles mentioned. We receive traffic and clients to this site from around the world, BUT our main geo-targeting is UK. Due to lack of resources and some legal needs we now have to create a new site - www.example.co.uk that all UK traffic will be able to purchase the product only from this site and not from the .com site anymore. We have no resources to create new content for the new .co.uk site and that is the reason we want to duplicate the site on both domains and use a canonical tag to point the .co.uk site as the primary site. Does anyone have experience with such activity? will this work across the whole site? We need to have a fast solution here, as we do not have too much time to wait because of the legal issue I mentioned. What is the best solutions you can offer to do this so we do not lose important SERPs. On the one hand since our main market is the UK, we assume the main site to promote will be www.example.co.uk but as said earlier, we still have users from other parts of the world as well. Is there any risk that we are missing here? Thanks James
Intermediate & Advanced SEO | | Tit0 -
How to remove hundreds of duplicate pages
Hi - while i was checking duplicate links, am finding hundreds of duplicates pages :- having undefined after domain name and before sub page url having /%5C%22/ after domain name and before the sub page url Due to Pagination limits Its a joomla site - http://www.mycarhelpline.com Any suggestions - shall we use:- 301 redirect leave these as standdstill and what to do of pagination pages (shall we create a separate title tag n meta description of every pagination page as unique one) thanks
Intermediate & Advanced SEO | | Modi0 -
Does a page on a site with high domain authority build page authority easier? i.e. less inbound links?
Is this also why people build backlinks to their BBB profiles, Yellowpages Profiles, etc. i.e. why do people build backlinks to other pages that link to them? Wouldn't it be more beneficial to just build that backlink directly to your target?
Intermediate & Advanced SEO | | adriandg0 -
Page Titles SEO Title
Hi, I run an e-commerce store and within the CMS I define the SEO title, SEO description and SEO keywords for each item. I spoke to a SEO firm who advised me to start every product title with the colour, as this will reduce the duplicate page titles and serve me well in the future. Whats everyones view on this? Does naming something Grey Armani Jeans | Armani Jeans from Designer Boutique stand up better against Armani Jeans Grey | Armani Jeans from Designer Boutique? Any help or tips on how to format the page titles and descriptions would be great. Thanks Will
Intermediate & Advanced SEO | | WillBlackburn0 -
Do in page links pointing to the parent page make the page more relevant for that term?
Here's a technical question. Suppose I have a page relevant to the term "Mobile Phones". I have a piece of text, on that page talking about "mobile phones", and within that text is the term "cell phones". Now if I link the text "cell phones", to the page it is already placed on (ie the parent page) - will the page gain more relevancy for the term "cell phones"?? Thanks
Intermediate & Advanced SEO | | James770