# Mapping hosts
At Marfeel, we can map domains to Fastly to test MarfeelCDN before activation, or map to a tenant's origin after activation, to compare behavior.
Use Marfeel command-line tool, Glue host, for all mapping operations.
# Map to the CDN
Map to the CDN to verify everything is working properly before the CDN Activation: all requests executed while mapping are identical to what would happen with the CDN active.
- Map both the APEX and non-APEX domains:
$ sudo glue host:add --ip 151.101.130.207 --url example.com
Password:
- Added the following mappings :
- 151.101.194.207 --> example.com
$ sudo glue host:add --ip 151.101.194.207 --url www.example.com
Password:
- Added the following mappings :
- 151.101.194.207 --> www.example.com
- Open the tenant's website in Google Chrome Incognito mode, simulating mobile requests.
In the Network tab, "Remote address" for the document must show the IP you used to map.
Seeing another IP?
Another IP in "Remote address" means your DNS record is cached. Be patient!
- Once you have seen everything you need, remember to remove the mapping!
Use host:remove
, and let the interface guide you to pick the right mappings to remove:
$ sudo glue host:remove
? Select the mapping you want to remove (Use arrow keys)
127.0.0.1 --> localhost
127.0.0.1 --> localhost.marfeel.com
❯ 151.101.194.207 --> example.com
- The following mappings got removed:
- 151.101.194.207 --> example.com
Repeat for both domains, APEX and non-APEX.
# Map to the Origin
Map to the Origin domain of the tenant when MarfeelCDN is already active to understand if an issue comes from the tenant or Marfeel.
- Use
dig
to get the IP address of the tenant's origin domain:
$ dig origin.example.com
; <<>> DiG 9.10.6 <<>> origin.example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29445
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;origin.example.com. IN A
;; ANSWER SECTION:
origin.example.com. 300 IN CNAME 35.196.144.170
;; Query time: 33 msec
;; SERVER: 212.231.6.7#53(212.231.6.7)
;; WHEN: Tue May 12 15:26:09 CEST 2020
;; MSG SIZE rcvd: 113
- Map both the APEX and non-APEX domains:
$ sudo glue host:add --ip 35.196.144.170 --url example.com
Password:
- Added the following mappings :
- 35.196.144.170 --> example.com
$ sudo glue host:add --ip 35.196.144.170 --url www.example.com
Password:
- Added the following mappings :
- 35.196.144.170 --> www.example.com
- Open the tenant's website in Google Chrome Incognito mode, simulating mobile requests.
In the Network tab, "Remote address" for the document must show the IP you used to map.
Seeing another IP?
Another IP in "Remote address" means your DNS record is cached. Be patient!
- Once you have seen everything you need, remember to remove the mapping!
Use host:remove
, and let the interface guide you to pick the right mappings to remove:
$ sudo glue host:remove
? Select the mapping you want to remove (Use arrow keys)
127.0.0.1 --> localhost
127.0.0.1 --> localhost.marfeel.com
❯ 35.196.144.170 --> example.com
- The following mappings got removed:
- 35.196.144.170 --> example.com
Repeat for both domains, APEX and non-APEX.