# Activate AMP with the CDN

MarfeelCDN can serve AMP pages through your main site domain or through the specific subdomain amp.yourdomain.com.

When MarfeelCDN is already active for the main site, AMP pages are automatically available via all the following URLs:

  • yourdomain.com/amp/section/article
  • yourdomain.com/section/article/amp
  • yourdomain.com/section/article.amp.html
  • yourdomain.com/section/article.html?amp
  • yourdomain.com/section/article.html?amp=1

Marfeel, and with it MarfeelCDN can be activated for the amp.yourdomain.com subdomain independently:

TIP

Follow this guide to activate Marfeel AMP solution without activating the complete Marfeel solution. The steps described in the guide only impact AMP pages.

Activation warning

Before AMP pages activation, it's a must to validate the Marfeel version is created. Otherwise the activation will have a negative impact on the tenant's traffic.

Validate if the Marfeel version is ready with non-AMP article URLs, that you append to Marfeel AMP URL:

https://live.mrf.io/amp/non-AMP-articleURL

Example:
https://live.mrf.io/amp/www.domain.com/my-cool-article
  1. Complete the CDN Wizard steps. Pay attention to the step "Add CNAME record", which has a special configuration to activate only AMP pages.

  2. Instead of following the normal "Register DNS to Marfeel IP" step, tenants must create 4 records in their DNS, but using the amp.examplesite.com domain instead of their main one.

Just like the normal step, there must be one record per IP address, using the IP addresses given by the CDN Wizard.

  1. The expected result for the AMP subdomain is:
 













 
 
 
 






$ dig amp.examplesite.com

; <<>> DiG 9.10.6 <<>> amp.elhorizonte.mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63873
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;amp.examplesite.com.		IN	A

;; ANSWER SECTION:
amp.examplesite.com.	600	IN	A	151.101.2.207
amp.examplesite.com.	600	IN	A	151.101.66.207
amp.examplesite.com.	600	IN	A	151.101.194.207
amp.examplesite.com.	600	IN	A	151.101.130.207

;; Query time: 65 msec
;; SERVER: 212.231.6.7#53(212.231.6.7)
;; WHEN: Fri Jul 03 12:00:17 CEST 2020
;; MSG SIZE  rcvd: 111

The DNS records of the "normal" domain are unchanged:

 












 
 







$ dig examplesite.com

; <<>> DiG 9.10.6 <<>> elhorizonte.mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55096
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;examplesite.com.			IN	A

;; ANSWER SECTION:
examplesite.com.		300	IN	A	101.200.191.72
examplesite.com.		300	IN	A	104.207.143.27

;; Query time: 70 msec
;; SERVER: 212.231.6.7#53(212.231.6.7)
;; WHEN: Fri Jul 03 12:00:11 CEST 2020
;; MSG SIZE  rcvd: 75

AMP HTML link rel

AMP HTML link rel must point to a URL using the following format:

amp.tenantDomain/articleUri

Example:
<link rel="amphtml" href="https://amp.tenantdomain.com/your-article-path">

Otherwise, the currently configured AMP pages will be served.