{"action":"closed","issue":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/8200","repository_url":"https://api.github.com/repos/gatsbyjs/gatsby","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/8200/labels{/name}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/8200/comments","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/8200/events","html_url":"https://github.com/gatsbyjs/gatsby/issues/8200","id":360618500,"node_id":"MDU6SXNzdWUzNjA2MTg1MDA=","number":8200,"title":"Create root domain redirect using gatsby-plugin-netlify","user":{"login":"janosh","id":30958850,"node_id":"MDQ6VXNlcjMwOTU4ODUw","avatar_url":"https://avatars0.githubusercontent.com/u/30958850?v=4","gravatar_id":"","url":"https://api.github.com/users/janosh","html_url":"https://github.com/janosh","followers_url":"https://api.github.com/users/janosh/followers","following_url":"https://api.github.com/users/janosh/following{/other_user}","gists_url":"https://api.github.com/users/janosh/gists{/gist_id}","starred_url":"https://api.github.com/users/janosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janosh/subscriptions","organizations_url":"https://api.github.com/users/janosh/orgs","repos_url":"https://api.github.com/users/janosh/repos","events_url":"https://api.github.com/users/janosh/events{/privacy}","received_events_url":"https://api.github.com/users/janosh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-09-16T08:46:17Z","updated_at":"2018-09-16T15:55:49Z","closed_at":"2018-09-16T15:55:49Z","author_association":"CONTRIBUTOR","body":"Can I use `gatsby-plugin-netlify` to implement Netlify's advice of redirecting my Netlify subdomain to my custom root domain?\r\n\r\n> If for SEO reasons you want to redirect your default Netlify subdomain to the primary domain, you can do so by adding the following rules to a _redirects file in the root of your site folder.\r\n> \r\n> ### Redirect default Netlify subdomain to primary domain\r\n> https://mycustomdomain.netlify.com/* https://mycustomdomain.com/:splat 301!\r\n\r\nI naively deployed the following changes to `gatsby-node.js` after installing and adding `gatsby-plugin-netlify` to my `gatsby-config.js` but they don't seem to take any effect.\r\n\r\n```\r\nexports.createPages = ({ graphql, actions }) => {\r\n  const { createPage, createRedirect } = actions\r\n\r\n  createRedirect({\r\n    fromPath: `https://mycustomdomain.netlify.com/*`,\r\n    toPath: `https://mycustomdomain.com/:splat`,\r\n    isPermanent: true,\r\n  })\r\n  ...\r\n}\r\n```"}}
{"actor":{"display_login":"janosh"}}