# Add rel="amphtml" to head - any tips?

**URL:** https://meta.discourse.org/t/add-rel-amphtml-to-head-any-tips/143773
**Category:** Support
**Created:** [March 10, 2020, 7:25am UTC](https://meta.discourse.org/t/add-rel-amphtml-to-head-any-tips/143773 "2020-03-10T07:25:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Bcat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bcat/32/163148_2.png) [@Bcat](https://meta.discourse.org/u/Bcat)
#### Post date: [March 10, 2020, 7:25am UTC](https://meta.discourse.org/t/add-rel-amphtml-to-head-any-tips/143773/1 "2020-03-10T07:25:43Z")

</div>

> I don’t like the way the administrator is discussing the issue, I see him abusing his authority.  
> This is my personal opinion anyway, I have no intention of changing this source code.

I want to implement AMP for my discourse!

I have created a template with url like: `amp.domain.com/blog/123456`  
`example: https://voucher.com.vn/dev/blog/846 or https://voucher.com.vn/dev/blog/844`

only mobile: [Redirect Notice](https://www.google.com/amp/s/go.thuvienmuasam.com/amp/t/846)

And now I’m looking for a way to insert the above url into the to declare the AMP page.

`example: <head> ... <link rel="amphtml" href="https://voucher.com.vn/dev/blog/846"> ... </head>`

Can someone help me with how to do it?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 10, 2020, 8:26am UTC](https://meta.discourse.org/t/add-rel-amphtml-to-head-any-tips/143773/2 "2020-03-10T08:26:48Z")

</div>

Why? AMP isn’t really compatible with JavaScript apps like discourse. Amp is for relatively static news and blog web pages, not apps.

---

<div class="post-metadata">

### Author: ![Bcat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bcat/32/163148_2.png) [@Bcat](https://meta.discourse.org/u/Bcat)
#### Post date: [March 10, 2020, 8:28am UTC](https://meta.discourse.org/t/add-rel-amphtml-to-head-any-tips/143773/3 "2020-03-10T08:28:36Z")

</div>

Because the page was created to create news articles, blogs.  
Should optimize the load as well as search results is an optimal choice.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 10, 2020, 8:30am UTC](https://meta.discourse.org/t/add-rel-amphtml-to-head-any-tips/143773/4 "2020-03-10T08:30:09Z")

</div>

I am afraid that would require completely rewriting Discourse from scratch, as in making it no longer a JavaScript app — if you really need amp that badly, choose a different free open source software.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 10, 2020, 8:30am UTC](https://meta.discourse.org/t/add-rel-amphtml-to-head-any-tips/143773/5 "2020-03-10T08:30:14Z")

</div>


