Title: Fixing duplicate pages HTTPs and HTTP
Last modified: August 30, 2016

---

# Fixing duplicate pages HTTPs and HTTP

 *  [bmfischer3](https://wordpress.org/support/users/bmfischer3/)
 * (@bmfischer3)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/fixing-duplicate-pages-https-and-http/)
 * So I have tried multiple times to fix this issue, however Ahrefs keeps showing
   me an error related to have duplicate pages which is the same page, but one under
   HTTP, and the other under HTTPS.
 * I currently have 2 robots.txt files setup, one for the http, and the other for
   https.
 * The HTTP one looks like this:
 * > #Robots.txt for HTTP
   > User-agent: *
   >  Disallow: /wp-admin/ Disallow: /wp-content/plugins/ Disallow:/
   > readme.html/
 * Then the HTTPS one looks like this
 * >  #Robots.txt for HTTPS
   > User-agent: *
   >  Disallow: /
 * If I have this setup, the HTTPS pages shouldn’t be seen right?

Viewing 1 replies (of 1 total)

 *  [Marios Alexandrou](https://wordpress.org/support/users/marios-alexandrou/)
 * (@marios-alexandrou)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/fixing-duplicate-pages-https-and-http/#post-6811542)
 * The robots.txt file isn’t the ideal way to handle this situation. Instead, I 
   would look at adding the appropriate rules to your .htaccess file that redirects
   users/search engines from http to https (or vice versa) for every page on the
   site. It can be accomplished with just a few lines in the .htaccess file. Search
   Google for samples of what you need to do.
 * Once you have .htaccess working, remove the Disallow from your robots.txt.

Viewing 1 replies (of 1 total)

The topic ‘Fixing duplicate pages HTTPs and HTTP’ is closed to new replies.

## Tags

 * [duplicate pages](https://wordpress.org/support/topic-tag/duplicate-pages/)
 * [HTTP](https://wordpress.org/support/topic-tag/http/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [robots.txt](https://wordpress.org/support/topic-tag/robots-txt/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Marios Alexandrou](https://wordpress.org/support/users/marios-alexandrou/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/fixing-duplicate-pages-https-and-http/#post-6811542)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
