【重複したホスト名からデータを受け取っています】を解消したい。
-
Googleアナリティクスより、
「重複したホスト名からデータを受け取っています(重複したホスト名の例:
cambodialife.mobi
http://www.cambodialife.mobi
)。重複したホスト名はレポートでは別々の行としてカウントされるため、別のホスト名からサイト上の同じページに移動するヒットは複数の行に分割されます。データが複数の行に分けられる結果、特定ページへのトラフィックは実際よりも少なく表示されます。」と通知がきました。
これが解決できずに困っているので、
やり方をご教授いただければ幸いです。解決方法を検索したところ、
1「重複したホスト名から別のホスト名へ 301 リダイレクトを設定」
2「ホスト名から「www.」を取り除く検索と置換フィルタを作成」
があるとわかりました。
2を試したのですが、2日経ってもまだ変化ありません。そこで1を試したいのですが、
現在.htaccessの中身は以下のようになっています。
/ここから/
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
# ETags(Configure entity tags) を無視する設定
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None# Enable Keep-Alive を設定
<IfModule mod_headers.c>
Header set Connection keep-alive
</IfModule># MIME Type 追加
<IfModule mime_module>
AddType image/x-icon .ico
AddType image/svg+xml .svg
AddType application/x-font-ttf .ttf
AddType application/x-font-woff .woff
AddType application/x-font-opentype .otf
AddType application/vnd.ms-fontobject .eot
</IfModule># プロクシキャッシュの設定(画像とフォントをキャッシュ)
<IfModule mod_headers.c>
<FilesMatch “\.(ico|jpe?g|png|gif|svg|swf|pdf|ttf|woff|otf|eot)$”>
Header set Cache-Control “max-age=604800, public”
</FilesMatch>
</IfModule># ブラウザキャッシュの設定
<IfModule mod_headers.c>
<IfModule mod_expires.c>
ExpiresActive On# キャッシュ初期化(1秒に設定)
ExpiresDefault “access plus 1 seconds”# MIME Type ごとの設定
ExpiresByType text/css “access plus 1 weeks”
ExpiresByType text/js “access plus 1 weeks”
ExpiresByType text/javascript “access plus 1 weeks”
ExpiresByType image/gif “access plus 1 weeks”
ExpiresByType image/jpeg “access plus 1 weeks”
ExpiresByType image/png “access plus 1 weeks”
ExpiresByType image/svg+xml “access plus 1 year”
ExpiresByType application/pdf “access plus 1 weeks2
ExpiresByType application/javascript “access plus 1 weeks”
ExpiresByType application/x-javascript “access plus 1 weeks”
ExpiresByType application/x-shockwave-flash “access plus 1 weeks”
ExpiresByType application/x-font-ttf “access plus 1 year”
ExpiresByType application/x-font-woff “access plus 1 year”
ExpiresByType application/x-font-opentype “access plus 1 year”
ExpiresByType application/vnd.ms-fontobject “access plus 1 year”
</IfModule>
</IfModule># Gzip圧縮の設定
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE# 古いブラウザでは無効
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch \bMSIE\s(7|8) !no-gzip !gzip-only-text/html# 画像など圧縮済みのコンテンツは再圧縮しない
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico)$ no-gzip dont-vary
# プロクシサーバーが間違ったコンテンツを配布しないようにする
Header append Vary Accept-Encoding env=!dont-varyAddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/js
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-font-woff
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
</IfModule># BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
SetEnvIf Request_URI “.*” AllowCountryModPagespeed On
/ここまで/これに
RewriteEngine On# www無しのドメイン名に統一
RewriteCond %{HTTP_HOST} ^www\.cambodialife\.mobi
RewriteRule ^(.*) http://cambodialife.mobi/$1 [R=301,L]を追加すればいいのでしょうか?
それとも上のコードをどこか置き換えるかたちにすればいいのでしょうか?長くなってすみません。
ご指導よろしくお願いいたします。
- トピック「【重複したホスト名からデータを受け取っています】を解消したい。」には新たに返信することはできません。