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
-
Company Name in Home Page Title? If and Where?
My guess is you want to do the {title} | {company name} format as I would suspect Google gives slightly more weight to the words at the beginning of the title? (This is assuming your company name isn't a generic word or you are specifically trying to rank your home page for your company name when it isn't ranking well already) But what about cases where you have like 5 or 6 keywords that are really important and used in the title gives you like 50 characters and your company name pushed it up to like 65 increasing the chance Google will use some other source to list the name of your home page in the search results? Obviously one can experiment, but wondering what the general consensus is - long keyword title, or longer title with company name? The company name can be included in the meta description and the domain name of the url displayed also gives the indication to the company. But maybe the algo "respects" long itles that have company name more than ones without as then it looks more like a keyword stuffing title? So many factors to consider. Yes - on page SEO isn't just about the title, but for this thread I'm just talking home page title.
Intermediate & Advanced SEO | | Wizkids9641 -
SEO implications of off-site secure Donation page
Hi Mozzers, I have a non-profit client that defends wildlife and public lands in the western US. The huge website is currently not responsive so we are working on that. In the meantime, we will be making the Action pages (such as Donations, Sign Petition, Get Newsletter) pages responsive. This will be housed under a new domain. My question is, what are SEO best practices for doing this? Does it negatively impact SEO to have a visitor "booted" from a site to a second secure site? Does Google know that the Donation site is in fact fulfillment and is linked to the original site? Also, what about domain implications? Is it best to have the name of the non-profit in the domain or sub, like this: https://saveanimals.secure.com/donate? Thanks everyone!
Intermediate & Advanced SEO | | CalamityJane770 -
Pages that did NOT 301 redirect to the new site
Hi, Is there a tool out there that can tell me what pages did NOT 301 redirect to the new sites? I need something rather than going into google.com and typing in site:oldsite.com to see if it's still indexed and if it's not 301 redirecting.. I'm not sure if screaming frog can do that. Thanks.
Intermediate & Advanced SEO | | ggpaul5620 -
Internal Duplicate Pages causing dip in rankings
Hi Guys, Need help in understanding whether having duplicate pages on your site push you down in rankings. Our all product pages getting indexed by Google with different parameters i.e. filters, affiliate id, utm_source etc. and then we have 10-15 duplicate for one product page. I am observing dip in rankings whenever Google starts indexing these duplicate but when I asked this question to John Muller and other Google team they said if you set up canonical then you don't have to worry about having different urls for same page but we are not ranking on Google and if we do then we dropped from page 1 to page 2 or sometimes page 3. Example - http://goo.gl/G5p3X5 Any suggestions.
Intermediate & Advanced SEO | | Webmaster_SEO0 -
How can I see all the pages google has indexed for my site?
Hi mozers, In WMT google says total indexed pages = 5080. If I do a site:domain.com commard it says 6080 results. But I've only got 2000 pages in my site that should be indexed. So I would like to see all the pages they have indexed so I can consider noindexing them or 404ing them. Many thanks, Julian.
Intermediate & Advanced SEO | | julianhearn0 -
HTML5 one page website on-site SEO
Hey guys, If for example, I'm faced with a client who has a website similar to: http://www.symphonyonline.co.uk/ How should I proceed with the on-site optimization? Should I create new pages on the website? Should I create a blog for the site to increase my reach? Please give me your tips on how to proceed with this kind of website. Thanks.
Intermediate & Advanced SEO | | BruLee0 -
HON Code Certification--how important is it for a health site?
How important is HON code for a health site? I am working on a client's site (health-related) that was hit by Panda and am wondering if anyone knows of any studies or has any personal experience with Panda & HON code?
Intermediate & Advanced SEO | | nicole.healthline0 -
Why duplicate content for same page?
Hi, My SEOMOZ crawl diagnostic warn me about duplicate content. However, to me the content is not duplicated. For instance it would give me something like: (URLs/Internal Links/External Links/Page Authority/Linking Root Domains) http://www.nuxeo.com/en/about/contact?utm_source=enews&utm_medium=email&utm_campaign=enews20110516 /1/1/31/2 http://www.nuxeo.com/en/about/contact?utm_source=enews&utm_medium=email&utm_campaign=enews20110711 0/0/1/0 http://www.nuxeo.com/en/about/contact?utm_source=enews&utm_medium=email&utm_campaign=enews20110811 0/0/1/0 http://www.nuxeo.com/en/about/contact?utm_source=enews&utm_medium=email&utm_campaign=enews20110911 0/0/1/0 Why is this seen as duplicate content when it is only URL with campaign tracking codes to the same content? Do I need to clean this?Thanks for answer
Intermediate & Advanced SEO | | nuxeo0