携帯専用サイト用の.htaccessの記述について(AirH"PHONE対応)

実は某所で1日平均200アクセス程度の携帯専用サイトを運用していて、「.htaccess」ファイルで携帯端末だけが使うIPアドレスを判別し、パソコンからのアクセスを拒否していたのだが、最近になって「AirH"PHONE」という携帯端末で、携帯専用サイトにアクセスできないという情報が寄せられた。

ネット上を検索すると「DoCoMo」「vodafone」「EZweb(au,TU-KA)」だけをアクセスさせる方法はあったのだが「AirH"PHONE」の振り分け情報を見つけることができなかった。

すると、とある方から「AirH"PHONE」が単体でアクセスするときのIPアドレス情報があるとの情報をいただき、さっそく「.htaccess」に追記した。

今のところネット上には「AirH"PHONE」も含めた携帯端末に対応した「.htaccess」ファイルを公開しているところはないようなので、4携帯端末に対応した「.htaccessファイル」の記述を備忘録として記録しておく。 もし携帯専用サイトを運営している方で同様の悩みをお持ちの方がいるようでしたら参考にして頂ければと思う。利用される方は、以下の部分をコピーして「.htaccess」ファイルに記述し、携帯専用サイトのあるディレクトリにアップロードしてください。

[2007年10月13日追記]モバイル版AdSenseのクローラー「Mediapartners-Google」が使用するIPアドレスについては当ブログの記事「IPアドレスで振り分けている携帯専用サイトでモバイル版AdSenseを使う方法」をご参考ください。

[2008年5月11日追記]i-modeやEZwebで使用されるモバイル検索用のGooglebotのクローラーのIPアドレスが公式に発表されました(2008年6月中旬以降運用予定のIPアドレス)。詳細はGoogle Japan BlogのGoogle モバイル検索についてのウェブマスター向け情報をご参考ください。

(2011年1月10日現在)
----------------
# 2011/1/10 更新
# (1) フルブラウザ=PCサイト閲覧ブラウザのIPアドレスを除く
# (2) 2011年7月以降に利用されるIPアドレスも含む

# iモード端末を許可(2010/11/)
# http://www.nttdocomo.co.jp/service/imode/make/content/ip/
allow from 111.89.188.0/24
allow from 111.89.189.0/24
allow from 111.89.190.0/24
allow from 111.89.191.0/24
allow from 124.146.174.0/24
allow from 124.146.175.0/24
allow from 202.229.176.0/24
allow from 202.229.177.0/24
allow from 202.229.178.0/24
allow from 202.229.179.0/24
allow from 210.136.161.0/24
allow from 210.153.84.0/24
allow from 210.153.86.0/24

# EZweb TU-KA端末を許可(2010/11/11)
# http://www.au.kddi.com/ezfactory/tec/spec/ezsava_ip.html
allow from 59.135.38.128/25
allow from 61.117.1.0/28
allow from 61.117.2.32/29
allow from 61.117.2.40/29
allow from 111.86.141.128/26
allow from 111.86.141.192/26
allow from 111.86.141.64/26
allow from 111.86.142.0/26
allow from 111.86.142.128/27
allow from 111.86.142.160/27
allow from 111.86.142.192/27
allow from 111.86.142.224/27
allow from 111.86.143.0/27
allow from 111.86.143.192/27
allow from 111.86.143.224/27
allow from 111.86.143.32/27
allow from 111.86.147.0/27
allow from 111.86.147.128/27
allow from 111.86.147.160/27
allow from 111.86.147.192/27
allow from 111.86.147.224/27
allow from 111.86.147.32/27
allow from 111.86.147.64/27
allow from 111.86.147.96/27
allow from 118.152.214.192/26
allow from 118.159.131.0/25
allow from 118.159.132.160/27
allow from 118.159.133.0/25
allow from 118.159.133.192/26
allow from 121.111.227.0/25
allow from 121.111.227.160/27
allow from 121.111.231.0/25
allow from 210.230.128.224/28
allow from 219.108.157.0/25
allow from 219.108.158.0/27
allow from 219.108.158.40/29
allow from 219.125.145.0/25
allow from 219.125.146.0/28
allow from 219.125.148.0/25
allow from 222.5.62.128/25
allow from 222.5.63.0/25
allow from 222.5.63.128/25

# SoftBank(旧vodafone)端末を許可(2010/6/25)
# http://creation.mb.softbank.jp/web/web_ip.html
allow from 123.108.237.0/27
allow from 202.253.96.224/27
allow from 210.146.7.192/26
allow from 210.175.1.128/25

# WILLCOM SMART PHONE/PHONE (旧AirH"PHONE)端末を許可(2010/10/6)
# http://www.willcom-inc.com/ja/service/contents_service/create/center_info/
allow from 61.198.128.0/24
allow from 61.198.129.0/24
allow from 61.198.130.0/24
allow from 61.198.131.0/24
allow from 61.198.132.0/24
allow from 61.198.133.0/24
allow from 61.198.134.0/24
allow from 61.198.135.0/24
allow from 61.198.136.0/24
allow from 61.198.137.0/24
allow from 61.198.138.100/32
allow from 61.198.138.101/32
allow from 61.198.138.102/32
allow from 61.198.138.103/32
allow from 61.198.139.0/29
allow from 61.198.139.128/27
allow from 61.198.139.160/28
allow from 61.198.140.0/24
allow from 61.198.141.0/24
allow from 61.198.142.0/24
allow from 61.198.143.0/24
allow from 61.198.160.0/24
allow from 61.198.161.0/24
allow from 61.198.162.0/24
allow from 61.198.163.0/24
allow from 61.198.164.0/24
allow from 61.198.165.0/24
allow from 61.198.166.0/24
allow from 61.198.168.0/24
allow from 61.198.169.0/24
allow from 61.198.170.0/24
allow from 61.198.171.0/24
allow from 61.198.172.0/24
allow from 61.198.173.0/24
allow from 61.198.174.0/24
allow from 61.198.175.0/24
allow from 61.198.248.0/24
allow from 61.198.249.0/24
allow from 61.198.250.0/24
allow from 61.198.251.0/24
allow from 61.198.252.0/24
allow from 61.198.253.0/24
allow from 61.198.254.0/24
allow from 61.198.255.0/24
allow from 61.198.255.0/24
allow from 61.204.0.0/24
allow from 61.204.2.0/24
allow from 61.204.3.0/25
allow from 61.204.3.128/25
allow from 61.204.4.0/24
allow from 61.204.5.0/24
allow from 61.204.6.0/25
allow from 61.204.6.128/25
allow from 61.204.7.0/25
allow from 61.204.92.0/24
allow from 61.204.93.0/24
allow from 61.204.94.0/24
allow from 61.204.95.0/24
allow from 114.20.49.0/24
allow from 114.20.49.0/24
allow from 114.20.50.0/24
allow from 114.20.50.0/24
allow from 114.20.51.0/24
allow from 114.20.51.0/24
allow from 114.20.52.0/24
allow from 114.20.52.0/24
allow from 114.20.53.0/24
allow from 114.20.53.0/24
allow from 114.20.54.0/24
allow from 114.20.54.0/24
allow from 114.20.55.0/24
allow from 114.20.55.0/24
allow from 114.20.56.0/24
allow from 114.20.56.0/24
allow from 114.20.57.0/24
allow from 114.20.57.0/24
allow from 114.20.58.0/24
allow from 114.20.58.0/24
allow from 114.20.59.0/24
allow from 114.20.59.0/24
allow from 114.20.60.0/24
allow from 114.20.60.0/24
allow from 114.20.61.0/24
allow from 114.20.61.0/24
allow from 114.20.62.0/24
allow from 114.20.62.0/24
allow from 114.20.63.0/24
allow from 114.20.63.0/24
allow from 114.20.64.0/24
allow from 114.20.64.0/24
allow from 114.20.65.0/24
allow from 114.20.65.0/24
allow from 114.20.66.0/24
allow from 114.20.66.0/24
allow from 114.20.67.0/24
allow from 114.20.67.0/24
allow from 114.21.128.0/24
allow from 114.21.129.0/24
allow from 114.21.130.0/24
allow from 114.21.131.0/24
allow from 114.21.132.0/24
allow from 114.21.133.0/24
allow from 114.21.134.0/24
allow from 114.21.135.0/24
allow from 114.21.136.0/24
allow from 114.21.137.0/24
allow from 114.21.138.0/24
allow from 114.21.139.0/24
allow from 114.21.140.0/24
allow from 114.21.141.0/24
allow from 114.21.142.0/24
allow from 114.21.143.0/24
allow from 114.21.144.0/24
allow from 114.21.145.0/24
allow from 114.21.146.0/24
allow from 114.21.147.0/24
allow from 114.21.148.0/24
allow from 114.21.149.0/24
allow from 114.21.254.0/27
allow from 114.21.255.0/27
allow from 125.28.0.0/24
allow from 125.28.1.0/24
allow from 125.28.15.0/24
allow from 125.28.16.0/24
allow from 125.28.17.0/24
allow from 125.28.2.0/24
allow from 125.28.3.0/24
allow from 125.28.4.0/24
allow from 125.28.5.0/24
allow from 125.28.8.0/24
allow from 210.168.246.0/24
allow from 210.168.247.0/24
allow from 210.169.92.0/24
allow from 210.169.93.0/24
allow from 210.169.94.0/24
allow from 210.169.95.0/24
allow from 210.169.96.0/24
allow from 210.169.97.0/24
allow from 210.169.98.0/24
allow from 210.169.99.0/24
allow from 210.255.190.0/24
allow from 211.126.192.128/25
allow from 211.18.232.0/24
allow from 211.18.233.0/24
allow from 211.18.234.0/24
allow from 211.18.235.0/24
allow from 211.18.236.0/24
allow from 211.18.237.0/24
allow from 219.108.10.0/24
allow from 219.108.11.0/24
allow from 219.108.12.0/24
allow from 219.108.13.0/24
allow from 219.108.14.0/24
allow from 219.108.15.0/24
allow from 219.108.7.0/24
allow from 219.108.8.0/24
allow from 219.108.9.0/24
allow from 221.119.0.0/24
allow from 221.119.1.0/24
allow from 221.119.2.0/24
allow from 221.119.3.0/24
allow from 221.119.4.0/24
allow from 221.119.6.0/24
allow from 221.119.7.0/24
allow from 221.119.8.0/24
allow from 221.119.9.0/24

----------------
注意

  1. サーバーによっては「.htaccess」の設置を許可していない場合もあるようですので使用に当たってはサーバー管理者へ問い合わせてください
  2. このIPアドレスは変更されたり、追加されることがありますので、#以降に記述したURLで最新情報をチェックしてください
  3. パソコンで上記「.htaccess」のあるディレクトリにアクセスすると「403 Forbidden」を返します。「.htaccess」に下記の記述を追加すると、パソコン用ページへとばすことができます

  4. ErrorDocument 403 パソコン用ページのURL