Mobile app version of vmapp.org
Login or Join
Debbie626

: Duplicated content www on subdomain and SSL I have a eCommerce based on OpenCart, but I was wondering about change my domain name for SEO purposes. For me the critical thing about my changes

@Debbie626

Posted in: #301Redirect #Google #Https #Redirects #Seo

I have a eCommerce based on OpenCart, but I was wondering about change my domain name for SEO purposes.

For me the critical thing about my changes are the imminent possibility of domain change, I'm freaking about damage my SEO and Google search position.
Please take this into your answer. I really need help to do not make a mistake.

The actual name put me on first page and 3 or 4 position. The new name have the exactly keyword most searched by visitors and probably i will get the first place.

As my SSL was expired I installed new one and the user @MarekAndreansky give me a hint (on my last question Cheap Positive SSL worths?):
I need redirect by 301 the www to take off the duplicate content.

Today I use: shop.example.com (subdomain) and appears on Google like that but it's still accessible by shop.example.com
That is the first change I need do, the next is about my SSL. I need that all access by shop.example.com redirect to shop.example.com.
Things to do:


How to do correctly that redirect in .htaccess and take off the duplicate content? I have found the .htaccess code change to DOMAINS name (not subdomain).
How to do correctly redirect all users that access shop.example.com by http to shop.example.com?

I want do it to spend more confidence, but if this can damage my ranking on Google I prefer forget it.

And about the domain name change in next 10 days I will decide.

UPDATE:

My domain: loja.genesiseries.com
I will remove domain soon, so please MODS don't remove please!

My htaccess

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess.

# For any support issues please visit: www.opencart.com
Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch ".(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_= [L,QSA]
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteRule ^index.php$ loja.genesiseries.com? [R=301,L]
# Tentativa de prevenir erro headers sent #RewriteCond %{HTTP_HOST} !^loja.genesiseries.com #RewriteRule ^(.*)$ loja.genesiseries.com/ [R=301,L]

### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

<FilesMatch ^config.php$>
Deny from all
</FilesMatch>
## INCREASE PAGE SPEED HTACCESS MODIFICATION ##
<ifModule mod_headers.c>
Header set Connection keep-alive
</ifModule>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
<ifModule mod_headers.c>
Header append Vary User-Agent
</ifModule>
## END INCREASE PAGE SPEED HTACCESS MODIFICATION ##


[UPDATE]

Now added to htaccess:

# this redirects example.com and example.com to https - thanks closetnoc @webmasters - stackexange
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} ^loja.genesiseries.com$ [NC, OR]
RewriteCond %{HTTP_HOST} ^www.loja.genesiseries.com$ [NC, OR]
RewriteRule ^(.*)$ loja.genesiseries.com/ [R=301,L]


Still give error 500, as you said i add the dot and cross bar
Something still wrong? There may be conflict with other rules?

[UPDATE 2] Below the apache error log

[Mon Nov 24 02:02:42 2014] [error] [client 58.37.14.114] /opt/php54/bin/php-cgi: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
[Mon Nov 24 02:02:42 2014] [error] [client 58.37.14.114] /opt/php54/bin/php-cgi: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
[Mon Nov 24 02:02:42 2014] [error] [client 58.37.14.114] /opt/php54/bin/php-cgi: /usr/lib64/libxml2.so.2: no version information available (required by /opt/xslt/lib/libxslt.so.1)
[Mon Nov 24 02:03:54 2014] [alert] [client 189.25.157.94] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters, referer: loja.genesiseries.com/tablet-genesis-gt-7325 [Mon Nov 24 02:03:54 2014] [alert] [client 189.25.157.94] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters, referer: loja.genesiseries.com/tablet-genesis-gt-7325 [Mon Nov 24 02:03:59 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:03:59 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:01 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:01 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:01 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:01 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:01 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:01 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:01 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:01 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:02 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:02 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:02 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:02 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:03 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:04 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:04 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:04 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters
[Mon Nov 24 02:04:04 2014] [alert] [client 177.180.245.74] /home/genesise/public_html/loja/.htaccess: RewriteCond: bad flag delimiters


What you suggest now?
I think that less times we use redirect is the best way, how optimize this htaccess?
Some redirects above was to assign a friendly URL

UPDATE 3

New HTACCESS

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_= [L,QSA]
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteRule ^index.php$ loja.genesiseries.com? [R=301,L]
# Tentativa de prevenir erro headers sent #RewriteCond %{HTTP_HOST} !^loja.genesiseries.com
#RewriteRule ^(.*)$ loja.genesiseries.com/ [R=301,L]

# this redirects example.com and example.com to https - thanks closetnoc @webmasters - stackexange
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^loja.genesiseries.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.loja.genesiseries.com$ [NC]
RewriteRule ^(.*)$ loja.genesiseries.com/ [R=301,L]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www.loja.genesiseries.com$ [NC]
RewriteRule ^(.*)$ loja.genesiseries.com/ [R=301,L]


Still with the problem with friendly URL, i'm feeling that we are so close :(

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Debbie626

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

You asked quite a few questions and I suspect you know most of the answers already. So to clear up some confusion, I will address the subject of changing the domain name since this sounds like the new question. If you need more, please let us know.

Keywords in domain names mean almost nothing anymore and exact matches rarely happen as a result. That was a mistake that Google quickly realized and reverted after only a fairly short period of time. It took about 2 years. What can I say, Google is a slow learner. It polluted the search pool with bad matches just because the domain name matched the search. It was a concept that failed miserably. I could have told them that had they asked. It was a no-brainer that domain monetizers would buy domain names for or just use domain tasting and spam the snot out of the search engines. Even a blind man could see that one coming.

I would not change domain names expecting better search results. In fact, you will actually lose by changing domain names. You lose all the value you have made over the lifetime of your current domain name when you change. Yes- you can do 301 redirects and recapture some/most of the value, but that old domain name must remain with a 301 redirect for that to happen. Somewhere along the line you will want to drop the old domain and you will find that you have relied upon the 301 redirect as a crutch and had not built as much value in your new domain as you should have. Plus too many redirects, and Google may not follow.

Generally speaking, unless there is a critical reason to change domain names, it is a horrible idea to do so.

There is no such thing as changing domain names for SEO purposes. Build value in the domain name you have now which seems to be working well. My grandfather always said, "If ain't broke, don't fix it!" He said a few other things, but they don't allow them on this site.

[Update]

I think this will do what you want... of course change the example.com with your domain name.

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^example.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ example.com/ [R=301,L]

RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ example.com/ [R=301,L]


The firs line checks to see if the request is not already HTTPS, the next two capture all requests, the last line redirects to HTTPS. Of course if the rewrite engine is not turned on in the configuration, then the very first line is required to enable redirects.

Okay. I just looked at your .htaccess file. You can put the lines almost anywhere, but for the sake of continuity, I would put it under:

# Tentativa de prevenir erro headers sent #RewriteCond %{HTTP_HOST} !^loja.genesiseries.com #RewriteRule ^(.*)$ loja.genesiseries.com/ [R=301,L]


... since it follows the same vein. You do not need to put in RewriteEngine On since you are already doing redirects- obviously it is on. As well, just for future reference, you can add a comment starting with a # like this:

# this redirects example.com and example.com to example.com

... to refresh your memory when you have to look at it again.

For what it is worth, the Apache documentation is here: httpd.apache.org/docs/current/mod/mod_rewrite.html It will make you go cross-eyed, but eventually you will begin to understand it and find it really is not that hard. The next thing you want to know about is regular expressions and there are good links for that on the same page.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme