# Can't make Ionic “deeplinks” work

**URL:** <https://forum.ionicframework.com/t/cant-make-ionic-deeplinks-work/110293>\
**Category:** ionic-v3\
**Created:** [October 28, 2017, 1:43pm UTC](https://forum.ionicframework.com/t/cant-make-ionic-deeplinks-work/110293 "2017-10-28T13:43:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hudi](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@hudi](https://forum.ionicframework.com/u/hudi)\
**Post date:** [October 28, 2017, 1:43pm UTC](https://forum.ionicframework.com/t/cant-make-ionic-deeplinks-work/110293/1 "2017-10-28T13:43:09Z")

</div>

I’m trying to use deeplink inside an Ionic **web** application (not a native one).

I followed [these instructions](https://ionicframework.com/docs/api/navigation/IonicPage/) step by step.  
But it seems to have absolutely no effect when entering the url (I see the home page).

**app.module.ts**

```auto
    @NgModule({
      declarations: [
       // ...
      ],
      imports: [
        IonicPageModule.forChild(FeedbackPage),
        BrowserModule,
        HttpModule]

```

**feedback.ts**

```auto
    @IonicPage({
      segment: 'some-path',
    })
    @Component({
      selector: 'page-feedback',
      templateUrl: 'feedback.html',
    })
    export class FeedbackPage extends HugoApiErrorsMixin implements OnInit {

```

Accessing `http://localhost:8100/#/some-path` display my home page instead of the Feedback page.  
Navigating manually to the Feedback page does NOT change the displayed URL.

By the way, after browsing the posts about deeplinks, it seems that **MANY** people seems to complain about deeplinks not working. It seems Ionic teams wants to hide that kind of problems, it is never mentioned on documentation when something is unstable.

_NOTE_ : I’m using ionic 3.8.0

---

<div class="post-metadata">

**Author:** ![hudi](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@hudi](https://forum.ionicframework.com/u/hudi)\
**Post date:** [October 29, 2017, 5:05pm UTC](https://forum.ionicframework.com/t/cant-make-ionic-deeplinks-work/110293/2 "2017-10-29T17:05:05Z")

</div>

No one for this? ☹

_No offense to anyone here, but It’s the 4th time I post simultaneously on this forum and Stack Overflow, and I always have better results with SO. (at least someone tries to help)._  
_Seriously, what’s the point to keep that forum alive? It only scatters useful ionic knowledge._

---

<div class="post-metadata">

**Author:** ![asamarcos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/asamarcos/32/113280_2.png) [@asamarcos](https://forum.ionicframework.com/u/asamarcos)\
**Post date:** [October 29, 2017, 8:45pm UTC](https://forum.ionicframework.com/t/cant-make-ionic-deeplinks-work/110293/3 "2017-10-29T20:45:03Z")

</div>

Don’t know if there are major differences between web/native navigation, but if it’s the same you are missing some points.

You should call: IonicModule.forRoot(MyApp) on imports of app.module.ts

MyApp should be your root component, normally app.component.ts

app.component.ts should have a property called rootPage, where you will reference the page (use string if using lazyload/deeplinks) you want to load first if no segments are added to you URL.

This rootPage should have some files:  
page.ts  
page.scss  
page.module.ts  
page.html

page.module.ts you sould declare page.ts and import IonicPageModule.forChild(Page)

page.ts must have decorator @IonicPage()

---

<div class="post-metadata">

**Author:** ![hudi](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@hudi](https://forum.ionicframework.com/u/hudi)\
**Post date:** [October 30, 2017, 9:25pm UTC](https://forum.ionicframework.com/t/cant-make-ionic-deeplinks-work/110293/4 "2017-10-30T21:25:38Z")

</div>

Hi @asamarcos, I’m glad to read your answer, because it is almost exactly what I had, but had some troubles with my deeplinks.  
And after reading the officiel doc, I thought everything had changed so I try to implement what is in the documentation, but it was worst, nothing worked as I wrote in my initial post.

About what you said, it’s almost exactly what I have currently. The only differences are: I don’t have 1 module per page, but I use the global module for all my pages and I don’t use `IonicPageModule.forChild(Page)`

That way, deeplinks seemed to work, but… when the URL of a deeplink is displayed, it never dissapears after that. I tried to explain the problem and show code here: [https://github.com/ionic-team/ionic/issues/13277](https://github.com/ionic-team/ionic/issues/13277)

Damn I never seen a topic more confusing that using deeplinks in Ionic, seriously. No one seems to know exactly what to do in what case 🙂

Thanks for you help.

---

<div class="post-metadata">

**Author:** ![jaydz](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@jaydz](https://forum.ionicframework.com/u/jaydz)\
**Post date:** [October 30, 2017, 10:06pm UTC](https://forum.ionicframework.com/t/cant-make-ionic-deeplinks-work/110293/5 "2017-10-30T22:06:31Z")

</div>

I’ve used, at least attempted to use it, and yeah it’s a complicated one. It wasn’t a necessity for me so I didn’t push the issue. Good luck!
