Is it possible to create more than one TWA app for different pages of the same domain? - trusted-web-activity

I already have a TWA app for my root domain which takes user to the home page. I have another page in the same domain and I want to target this as a landing page via a new TWA app.
https://developer.chrome.com/docs/android/trusted-web-activity/multi-origin/ - This will not help as the landing page for the two TWA apps are different.
As the web-server hosting both pages will share a single manifest file, I don't see a possibility of setting start_url attributes differently for 2 TWA apps.
Are there any alternate ways of achieving this?

I am no big expert on the subject (In fact I myself came here to figure things out).
But I have implemented four different TWAs in one domain. So, yes it is possible. You need to give different "launch url" (or android.support.customtabs.trusted.DEFAULT_URL) for each of those.
Not sure why you say manifest file will be common. My all PWAs have different manifest file, and so do corresponding TWAs.

Related

How to redirect indexation bots to a different route using a Vue.js SPA to server rendered pages for them to be crawled and indexed?

I need to develop a Vue.js SPA where some of its pages need to be referenced by search engines.
I've read about multiple ways to make SPAs SEO-Friendly so I found the following solutions
Server-rendered pages
Prerendering
Since we have a lot of dynamic content to index, generating a static page for each "row" in the database seems not acceptable since we have hundreds if not thousands of content pages.
Creating multiple routes (one for users to visualize and one for bots to crawl)
This solution has been proposed by my manager and it interests me since it's more suitable for our case.
I found this article that illustrates the idea using another SPA framework
My question here is how can I detect that a crawler or an indexation bot have accessed our SPA in order to redirect it to our server rendered web pages and how to actually achieve that in Vue.js 2 (Webpack) ?
If you are concerned about SEO, the solution is to use SSR. Read through https://v2.vuejs.org/v2/guide/ssr.html#The-Complete-SSR-Guide.
If you already have server rendered webpages, as you mentioend in your question, then using SSR would be less work than keeping the Vue SPA and server app in sync. Not to mention, if the Vue SPA and server app show different content, this could hurt SEO and frustrate users.
Any method you use to target web crawlers can be by-passed, so there is no generic solution for this. Instead, try and focus on specific web crawlers, like Google's.
For Google, start by registering your app at https://www.google.com/webmasters. If you need to determine if the Google crawler visited your server, look at the user agent string; there are already other answers for that: Is it possible to find when google bot is crawling any urls on my site and record the last access time to a text file on server, https://support.google.com/webmasters/answer/80553?hl=en.

Branch.io links not tracking clicks after custom subdomain setup

BACKGROUND
I have an app that was set up using a default branch domain (ex: my.app.link).
Links were created using my.app.link. Many of these links needed to mirror existing links I have in production (with another linking service that we are migrating off of) that use a format not supported in Branch.io, so I had to work around the issue by using a '-' in place of '.' in the link's path. This is a solution recommended by Branch with the assurance that the '.' would be translated to a '-' on the backend at Branch.io (this appears to work fine).
I recently had a custom subdomain CNAMEd over to custom.bnc.lt (ex: myapp.mydomain.com).
The link settings in the Branch.io dashboard have been updated to use the custom subdomain (change is valid: "Domain is correctly set up and SSL is working.").
ISSUES
All pre-existing quick links still have the old default domain, no clicks register even though they 'work' with the new subdomain.
Duplicating one of these links picks up the new subdomain, but the url that gets created is http, not https (which is the default for any other link we created and there doesn't seem to be a way to choose one protocol or the other, nor can it be updated in the dashboard). This also seems to be causing link clicks to not track in the dashboard.
The fact that we mirrored links from another platform using a workaround (replacing '.' for a '-'), also seems to cause link clicks to not track in the dashboard.
QUESTIONS
How does Branch.io handle link clicks for a quick link that has been set up for an app using a custom subdomain? Does the configured link need to match 1:1 to the link that is clicked on the device?
How can I fix the original links, especially if I can't duplicate them (to pick up the custom subdomain) in a way that gives me a 1:1 match to the previous link I created (since the new link is http and the others are https, as would be distributed in a live/production environment)?
Why isn't Branch tracking link clicks for the x.y.z links that I set up as x-y-z? This aliasing works fine, and seemed to be tracking clicks fine in test.
Amruta from Branch.io here:
1. How does Branch.io handle link clicks for a quick link that has been set up for an app using a custom subdomain?
A: For all Branch links, every time a Branch link is clicked the click is is registered by Branch. Using a custom domain (if configured properly) should not cause any problems in registering clicks on the Branch dashboard neither should using Quick links cause any issues. Also Branch links with either schemes http:// or https:// register link clicks. Having Branch links with http:// scheme should not cause any issues with registering link clicks
2.All pre-existing quick links still have the old default domain
A: The old links created on the app.link will not be updated with your custom domain. If you wish to use links with your link domain, you can create new links with the same link parameters. (PS: both links on the old app.link domain and links on your custom domain should work as before if you still have your App configured to support the app.link domain links.)
3. Duplicating one of these links picks up the new subdomain, but the url that gets created is http, not https
A: At present, the Branch API creates Branch links for custom domains with the 'http://'scheme. This is because we are not sure if custom domains have the SSL certificate and creating links with the https:// scheme would break for such domains. Hence by default, all custom domain links are created using the http:// scheme. There is no direct way to create links using the https:// scheme using the Branch API, the only way you can do it is by manually changing the scheme from 'http' to 'https://'.
4. Why isn't Branch tracking link clicks for the x.y.z links that I set up as x-y-z? This aliasing works fine, and seemed to be tracking clicks fine in test.
I believe, the issue here has nothing to do with your custom domain but is maybe related to a key mismatch. You mention that the link clicks were tracked in the test version of the App, which leads me to believe that your app is still using the Branch key from the test version (key format: key_test_XXXXXXXXXXXXXXX). Please ensure that your App is using the correct key. The simple test for this: When you click on the Branch link, you get the link parameters in your app and the link parameters contain +clicked_branch_link:true. If so, the link click will be tracked on Branch's end.
If you still continue to face issues, you could write to integrations#branch.io and our team would be more than happy to help you resolve the issue.

How to make reactjs serve static pages for SEO

I have this reactjs webapp - http://52.26.51.120/
It loads a single page and then you can click links to dynamically load other boards on the same page... such as 52.26.51.120/#/b, 52.26.51.120/#/g
Now the thing is, I want each of these to be an individual page, for the purpose of seo. I want you to be able to google "my-site.com g", and you will see the result 52.26.51.120/#/g. This obviously cant work if you are using reactjs and it is all on one page. Google will only render and cache that main page (can it even render that page? does google execute javascript?)
Even more specifically, id want something like my-site.com/g/1234 to load a thread. There could be a thousand threads every day, so im not sure how to handle that.
Are there any solutions to this? to allow react to possibly serve up static pages as html so that they can be cached on google? I am using expressjs and webpack as my server right now, and all the code is executed in jsx files.
Thanks
You can use Prerender.io service. In a nutshell you will need to connect your server app or web server with prerender service and do little setup (see documentation). After that search engines and crawlers will be served with a static (prerendered) content while users will get classic React.js (or any other single page) app.
There is a hosted service with free tier or open source version
I suspect you could do some smart configuration with nginx and it could convert a url of domain/board to a redirection of domain/#/board when detecting the user-agent as a bot instead of a typical user.

Create a copy of my website on Cpanel

I want to link my mobile variant website version to the desktop version i.e "view website in desktop". You click this button and it will take you to the desktop version only. Program I use is Xara Web Designer. CPanel is where the files are hosted.
They have advised I need to create two copies of my website to do this.
I can duplicate my website but how would I go about uploading the two copies to CPanel? Also I would need to remove the robots.txt file from one of them because I do not want google crawling the duplicate site (SEO Issues).
Would I need two domains? I want to keep just one.
Thanks in advance please let me know if you need clarification on anything.
There are better solutions with regards to SEO such as making your website 'mobile responsive'. But to answer your specific question, you are probably best to create a mobile website and set it up on a 'm.' subdomain (so you only need your 1 domain name). You can do this from cPanel under 'Subdomains'.
As for no-indexing the mobile website with robots.txt, the correct method is to use the 'canonical' tag. This is a good guide from Google on the subject: https://developers.google.com/webmasters/mobile-sites/mobile-seo/overview/select-config?hl=en

How to customize SharePoint 2010 mobile view

I am stuck on developing a mobile view for my SP2010 publishing portal. It is Internet-facing with custom pages / web parts (e.g. http://server/Pages/customPage.aspx with custom webparts on it). The site has a custom master page.
I am having the following issues with the built-in mobile functionality:
The welcome page. Navigating to
http://server/?Mobile=1 redirects me
to
http://server/_layouts/mobile/mbllists.aspx, which just shows a table of lists / document libraries available. For
my portal, I want to show a
dashboard, just like I currently do for the "normal" non-mobile view.
Navigating to one of my custom
pages (e.g.
http://server/Pages/customPage.aspx?Mobile=1)
also redirects to
http://server/_layouts/mobile/mbllists.aspx.
So in effect there is really no helpful built-in mobile support at all; just the ability to view lists with a mobile device.
So I have a number of issues and I'm hoping for some high-level help. My thought is that I should do the following tasks:
Create a separate master page for mobile
Figure out how to choose this master page based on "is client a mobile device?"
Figure out how to prevent the redirection to /_layouts/mobile/mbllists.aspx
Then I think the mobile site will operate similarly to the normal site.
Am I on the right track?
[Edit]
With what I have seen from links from #moontear and other research I've done, it sounds like my best option is to just disable built-in SharePoint mobile support, and just do my own conditional rendering based off of Request.Browser.IsMobileDevice.
Check out the extensive MSDN documentation about how to customize Mobile Views:
How to: Customize Mobile List View and Form Pages
when you check out that page you can see that you can already change the layouts of the list forms and maybe that is enough for you - but as you said you want a custom "Dashboard", you probably want to look into how the mobile redirection works:
Overview of Mobile Pages and the Redirection System
You can set which device is treated as mobile device by editing the compat.browse file as explained in this post: SP2010 Branding Tip #6 – Mobile Browsers, this way the device you set is shown your regular Sharepoint page (answering your questions 2/3).
Copy the "_layouts/mobile" folder to e.g. "_layouts/MyCompany/mobile", in webconfig add following appSetting key:
<add key="mobile_applicationrootdirectory" value="_layouts/MyCompany/mobile/"/>
After that you can add branding, css, etc. to your own mobile folder.
SharePoint is using this by calling SPMobileUtility.GetAppRootDirName()
http://msdn.microsoft.com/en-us/library/ee553908(v=office.14).aspx
using powershell
Disable-SPFeature -Identity MBrowserRedirect -Url http://url