Expand my Community achievements bar.

SOLVED

Redirecting to the publisher instance from the endpoint domain.

Avatar

Level 1

Hi All, 

 

Have created a new AEM dev instance, the end point is set properly but when clicking on any link on the home page it is hitting the publisher server instead of endpoint domain.

Tried few configurations in the dispatcher file when we remove the Rewrite rule which truncated the content path it is hitting the correct domain but throwing 404 error.

Can some one suggest the solution to resolve the issue?

Thanks in advance!

 

Regards,

Prasannajali.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Got it. its obvious, your author is NOT fronted with Dispatcher. But publisher, by default is fronted with dispatcher. Traffic has to pass dispatcher to reach publisher, and in your case, traffic got snapped at dispatcher itself before hitting publisher. 

 

Now dont remove this rule as it might be intentional to route non-aem traffic. Instead whitelist (PT) rule to specific path that you need. So only your path will hit publisher and remaining paths are deflected as previous. 

 

Another advice is to leverage CDN traffic config pipeline as shared above. Order of traffic flow is 

`Browser --> CDN --> Dispatcher --> Publisher <-- Author`


Snapping traffic at much higher layer makes the website faster. 

View solution in original post

4 Replies

Avatar

Community Advisor

@SaiM , can you share example of link on homepage that hits publisher? This is more than publisher / dispatcher issue. Todo with CDN. Your CDN is redirecting all traffic to dispatcher. 

is this AEMasCS? CloudService supports configuring pipelines to control CDN traffic. 

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/con...

 

So, under /apps/project/config/dev/ create a cdn.yaml. Configure the CDN traffic rules as per your requirements.

 

If you can share failing url, can further assist.

Avatar

Level 1

Thanks for the response @sarav_prakash, the redirect is happening to the correct server after removing the below rewrite rule "RewriteRule ^/content/${PROJECT_FOLDER}/us/en/(.*)$ $1 [R=301,L]". What might be the root cause and how this issue is related to publisher as the publisher is created in the backend when an environment is created?

Regards,

Sai M.

Avatar

Correct answer by
Community Advisor

Got it. its obvious, your author is NOT fronted with Dispatcher. But publisher, by default is fronted with dispatcher. Traffic has to pass dispatcher to reach publisher, and in your case, traffic got snapped at dispatcher itself before hitting publisher. 

 

Now dont remove this rule as it might be intentional to route non-aem traffic. Instead whitelist (PT) rule to specific path that you need. So only your path will hit publisher and remaining paths are deflected as previous. 

 

Another advice is to leverage CDN traffic config pipeline as shared above. Order of traffic flow is 

`Browser --> CDN --> Dispatcher --> Publisher <-- Author`


Snapping traffic at much higher layer makes the website faster. 

Avatar

Level 1

Thanks for the solution Sravan, most of the issue were resolved but looking some issue where we authored the content path to the home page specifically rest all are working fine. I added the below code in cdn.yaml file.

 

kind: "CDN"
version: "1"
metadata:
  envTypes: ["dev"]
data:
  authentication:
    authenticators:
      - name: edge-auth
        type: edge
        edgeKey1: ${{CDN_EDGEKEY_060225}}
        edgeKey2: ${{CDN_EDGEKEY_020625}}
    rules:
      - name: edge-auth-rule
        when: { reqProperty: tier, equals: "publish" }
        action:
          type: authenticate
          authenticator: edge-auth
    originSelectors:
    rules:
      - name: fdcloud-ondemand-labcorp-com
        when: { reqProperty: path, like: /proxy* }
        action:
          type: selectOrigin
          originName: fdcloud.ondemand.labcorp.com
          skipCache: true
    origins:
      - name: fdcloud-ondemand-labcorp-com
        domain: fdcloud.ondemand.labcorp.com
Any suggestions here?