Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Como criar Permalinks personalizados no WordPress (guia definitivo)

Nota editorial: Ganhamos uma comissão de links de parceiros no WPBeginner. As comissões não afetam as opiniões ou avaliações de nossos editores. Saiba mais sobre Processo editorial.

Você deseja criar permalinks personalizados no WordPress para posts, páginas e outros tipos de posts?

Recentemente, um de nossos leitores perguntou se era possível criar seus próprios permalinks personalizados, ou estrutura de URL de página, no WordPress.

Neste artigo, mostraremos como criar permalinks personalizados no WordPress sem afetar seu SEO.

How to create custom permalinks in WordPress (step by step)

Como este é um tutorial abrangente sobre a criação de permalinks personalizados no WordPress, criamos um índice fácil de navegar:

Permalinks são os URLs permanentes de seus posts de blog individuais, páginas e outras páginas de arquivo em seu site WordPress.

O objetivo do seu permalink é criar uma estrutura de URL fácil de entender, tanto para humanos quanto para mecanismos de pesquisa.

Por exemplo: https://example.com/best-refrigerators-for-tiny-kitchens/

Esse URL é muito melhor do que os URLs antigos, como: https://example.com/index.php?p=4556

O WordPress oferece aos proprietários de sites várias opções de permalink para escolher. Você pode visualizá-las visitando a página Configurações ” Permalinks.

Select permalink structure

Além de alterar a estrutura principal do permalink, o WordPress também oferece maneiras de personalizar os URLs individuais de posts, páginas, categorias, tags e outras áreas do seu blog.

Também é possível usar os plug-ins do WordPress para criar permalinks totalmente personalizados para seções específicas do seu site que substituem as configurações padrão do WordPress.

Vamos dar uma olhada em todas as opções, uma a uma. Começaremos com as opções internas padrão que vêm com seu site WordPress.

Tutorial em vídeo

Subscribe to WPBeginner

Se você não gostar do vídeo ou precisar de mais instruções, continue lendo.

Se você quiser alterar todo o esquema de geração de URL do seu site, vá para a página Configurações ” Permalinks no painel de administração do WordPress.

Select permalink structure

Aqui, você pode selecionar uma estrutura de URL para seus posts individuais. Você também pode usar as tags mostradas na tela para criar uma estrutura personalizada para seus URLs do WordPress.

Por exemplo, você pode usar o título da postagem (%postname%) e a categoria (%category%), além do ano (%year%) em que ela foi publicada.

Não se esqueça de clicar no botão “Save Changes” (Salvar alterações) na parte inferior da página para armazenar suas alterações.

Recomendamos o uso de uma estrutura de URL que inclua o nome da postagem na URL. Isso torna seus URLs mais fáceis de usar e pode melhorar o SEO do WordPress.

Certifique-se de usar permalinks amigáveis para SEO como esse ao criar um novo blog ou site do WordPress.

Entretanto, se você tiver um site existente que já esteja recebendo tráfego dos mecanismos de pesquisa, a alteração dos permalinks poderá afetar suas classificações de SEO.

Como alterar o prefixo do URL da categoria e da tag no WordPress

Por padrão, o WordPress usa /category/ como base para seus URLs de categoria e /tag/ para as páginas de tags.

Assim como os exemplos abaixo:

https://example.com/category/technology/
https://example.com/tag/fintech/

Você pode alterar esses prefixos básicos acessando Settings ” Permalinks e simplesmente inserindo novos prefixos.

Category and tag base

Certifique-se de clicar no botão “Save Changes” (Salvar alterações) para atualizar a base de categorias e a base de tags.

Agora, você terá uma nova categoria e bases de tags ativas em seu site, como estas:

https://example.com/topics/technology/ (para páginas de categoria)
https://example.com/hashtag/fintech (para páginas de tags)

Depois de configurar sua estrutura inicial de permalink, o WordPress a usará como modelo para todos os links do seu site.

No entanto, você também pode alterar o slug do URL dentro da estrutura do URL para posts individuais, páginas e tipos de post personalizados, para torná-lo mais amigável para SEO.

Você pode personalizar a parte do slug do URL na tela de edição da postagem dentro do editor de conteúdo do WordPress.

Se estiver criando um novo post ou página, será necessário clicar em “Publicar” ou “Atualizar” para salvar o rascunho primeiro.

Depois disso, basta clicar em “URL Slug” na caixa de meta Permalink.

Change post permalink

Em seguida, altere o slug do URL do post para um permalink personalizado.

Quando terminar, clique no botão “Update” (Atualizar) para salvar o novo permalink.

Save post permalink

Você pode usar esse método para todos os tipos de post, incluindo produtos do WooCommerce, sites de associação, cursos on-line e muito mais.

Na etapa anterior, mostramos como modificar o prefixo base da categoria e da tag no WordPress. Nesta etapa, mostraremos como alterar as palavras-chave do URL para uma categoria ou tag individual.

Basta acessar Posts ” Categorias e clicar no link “Editar” abaixo da categoria que você deseja personalizar.

Editing a category details in WordPress

O WordPress agora carregará os detalhes da categoria.

A partir daqui, você pode alterar o slug da categoria para personalizar seu permalink.

Change category slug to customize permalink

Certifique-se de clicar no botão “Update” (Atualizar) para salvar suas alterações de slug de categoria.

Da mesma forma, você pode editar uma tag individual acessando a tela Posts ” Tags e seguindo as mesmas etapas.

Edit a tag

Você também pode editar quaisquer taxonomias personalizadas usando o mesmo método descrito acima.

O WordPress criará automaticamente um URL de página de autor para os diferentes autores em seu site.

A aparência é a seguinte: https://example.com/author/jsmith/

No exemplo acima, jsmith é o slug e author é a base.

O problema é que o WordPress não vem com uma opção para alterar a base do URL do autor ou o slug.

Felizmente, você pode alterar isso com apenas alguns cliques usando um plug-in do WordPress.

A primeira coisa que você precisa fazer é instalar e ativar o plug-in Edit Author Slug. Para obter detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.

Após a ativação, vá para a página Usuários ” Todos os usuários. Em seguida, clique no link “Edit” (Editar) abaixo do nome de usuário.

Editing a user details in WordPress

Na página seguinte, role para baixo até a seção “Edit Author Slug”.

Aqui, você poderá escolher um slug de autor ou adicionar o seu próprio na caixa “Personalizado”.

Edit or add author slug

Não se esqueça de clicar no botão “Update User” (Atualizar usuário) para armazenar suas configurações de permalink.

Se você quiser alterar a base do permalink do autor, basta ir para Settings ” Edit Author Slug.

Aqui, você verá uma opção para alterar a base de autores e até mesmo escolher bases de autores diferentes para usuários com funções de usuário diferentes.

Change author base

Para obter mais detalhes, consulte nosso guia sobre como alterar o slug e a base do URL do autor no WordPress.

Todos os métodos acima permitem que você personalize os links permanentes do WordPress até certo ponto. Entretanto, eles não podem ajudá-lo a criar permalinks totalmente personalizados.

Isso ocorre porque o WordPress não oferece essa funcionalidade por padrão.

Felizmente, há um plug-in que pode ajudar. Se você quiser substituir a estrutura de URL padrão do WordPress para seções específicas do seu site, esse plug-in é para você.

A primeira coisa que você precisa fazer é instalar e ativar o plug-in Custom Permalinks. Para obter mais detalhes, consulte nosso guia para iniciantes sobre como instalar um plug-in do WordPress.

Após a ativação, você precisa abrir a postagem na qual deseja criar um link permanente personalizado.

Em seguida, em vez de editar o permalink como acima, você encontrará a opção de criar um permalink personalizado abaixo do editor na caixa “Custom Permalink” (Permalink personalizado).

Custom permalinks box

Da mesma forma, você também pode criar permalinks personalizados para categorias.

Para fazer isso, vá para a página Posts ” Categorias e clique no link “Editar” abaixo da categoria que você deseja alterar.

Editing a category details in WordPress

Na página de detalhes da categoria, você encontrará a opção de criar um permalink personalizado para essa categoria específica.

Você pode até mesmo criar um URL sem o prefixo da base da categoria.

Editing the category permalink

Você pode gerenciar e desativar todos os seus permalinks personalizados navegando até Custom Permalinks ” Post Type Permalinks na barra lateral do administrador.

Basta selecionar os permalinks personalizados que deseja excluir e, em seguida, clicar no menu suspenso “Ações em massa” para selecionar a opção “Excluir permalinks”.

Manage custom permalinks

Depois disso, clique no botão “Apply” (Aplicar), e o plug-in removerá esses permalinks personalizados. O permalink excluído será substituído por seu esquema de permalink padrão.

Você também pode usar o plug-in para gerenciar e excluir em massa seus permalinks de taxonomia acessando Custom Permalinks ” Taxonomies Permalinks e seguindo as mesmas etapas.

Se você tiver feito alterações na estrutura de permalink ou no slug do autor, ou se tiver criado permalinks totalmente personalizados, há uma chance de encontrar erros 404.

Para corrigir isso, você precisa configurar redirecionamentos de permalink de seus permalinks antigos para os novos para evitar esses erros.

A maneira mais fácil de fazer isso é usar o plug-in All in One SEO. É o melhor plug-in de SEO para WordPress usado por mais de 3 milhões de sites para aprimorar seu SEO.

AIOSEO

Ele tem um complemento avançado de gerenciador de redirecionamento que permite gerenciar redirecionamentos 301 para seus permalinks, acompanhar e corrigir erros 404 e muito mais.

Para obter mais detalhes sobre a configuração de redirecionamentos de permalink, consulte nosso guia para iniciantes sobre a criação de redirecionamentos 301 no WordPress.

Após a ativação, você pode gerenciar e criar novos redirecionamentos de permalink diretamente no painel do WordPress.

AIOSEO redirection manager

Além disso, o AIOSEO também ajuda a rastrear e corrigir páginas de erro 404. Se por acaso você perder alguns redirecionamentos, isso poderá ajudá-lo a encontrá-los e corrigi-los mais tarde com facilidade.

Esperamos que este artigo tenha ajudado você a aprender como criar permalinks personalizados no WordPress. Talvez você também queira ver nosso guia para escolher a melhor plataforma de blog e nossas escolhas de especialistas para os melhores aplicativos de número de telefone comercial virtual.

Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

86 ComentáriosDeixe uma resposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    I knew some of the settings from WordPress, but some I didn’t even know could be adjusted like this. For example, changing the author URL with a permalink looks great. Is it possible to do this other than using a plugin? I would like to avoid a lot of plugins.

  3. Tasin says

    Bro I do not have the permalink editor in the post editor sidebar. Why is that? I am using the latest version of WordPress. I can edit url in classic editor but not in block editor.

    • WPBeginner Support says

      We would recommend checking your preferences in the post editor to ensure you do not have that section hidden as a likely reason.

      Administrador

    • WPBeginner Support says

      That looks like you are using an eCommerce plugin, you would want to check further down the permalinks page or in the plugin’s settings for modifying those permalinks.

      Administrador

  4. Vivek says

    Hello,
    To rank my news website on Google News, do I need to use the permalink link Iike postname-postID?

    Because I see most of the news website uses this format?

  5. Jacob Corbett says

    Hi WP Beginner,

    Great article! I have already made multiple pages with a theme and I want to change all their permslinks. Every time I do it I get a 404 on the updated page.

    • WPBeginner Support says

      You would likely need to resave your permalink settings and redirect your old posts/pages if you wanted.

      Administrador

    • WPBeginner Support says

      It would depend on what you do with the plugin, using the plugin to make the same change you would do manually would not be different than using the plugin if that is what you mean

      Administrador

  6. Katie says

    I see that this post was originally from 2016. Would you still recommend using Custom Permalinks as the plugin for this? When i went to add the plugin it says “Untested with your version of WordPress” and the last update was a year ago. Would love to know if this is still recommended.

  7. A K P says

    Hi,

    I have old website and now I change my Permalink Settings setting from date pattern to post name.

    will it change old links too?

    Site is performing good in google. I don’t want to change old setting.

    But new post with Post name Permalink Settings.

    • WPBeginner Support says

      The link to the post itself would change but links to the post at the old location would not update and would cause 404 errors for anyone using those links.

      Administrador

  8. WONDER APATI says

    Hello, I read your post on how to migrate from blogger to WordPress. One of the things that I see as the issue here is the link structure and AdSense.

    Assuming that I migrate from blogger to WordPress without setting the link to month and day as you recommended in the other post but rather choose to edit each post I migrated from blogger to match the month and day, will that work?
    Otherwise, all other posts I published will maintain the posts URLs except those imported from blogger(they would be edited to match the month and day) will that be ok

    • WPBeginner Support says

      If you change your permalinks then you would need to create redirects to prevent your visitors from seeing 404 errors.

      Administrador

  9. Adhyansh Jadli says

    Thank you very much for such a nice article. I was finding way to set up categories and tags. I am regular follower of your blog and youtube channel.
    It is the best platform i had ever seen, which provide detailed info for newbie like me.
    You helped me to setup my wordpress.
    Thanks a lot SYED BALKHI sir
    Adhyansh Jadli

  10. Pawan Khadka says

    Is there any post that guide me to create query based url example :
    Main Content: example.com/this-is-my-post (Page With main content)
    Download page: example.com/this-is-my-post?download (page with download links)

    • WPBeginner Support says

      Unless I hear otherwise, we do not have a recommended method to set up that kind of permalink

      Administrador

  11. Marina28 says

    What can we do for the urls tha are not post and pages for example in a forum plugin that I embed I can not edit the urls for it. There is any file in wordpress that I can edit each one url ??

    • WPBeginner Support says

      You would want to reach out to the support for that specific plugin for how to modify the permalinks for its additions.

      Administrador

  12. Ferdin Norbert says

    Hi, Nice post. Currently, I am working on a project where I wanted to change an in built tab called promotions and I did this programmatically, I was successful in renaming the promotions tab to Notification tab. But the only thing left is its permalink. I want to change MyAccount/Promotions to MyAccount/Notifications. Is there any way to achieve this? Please reply as soon as possible.
    Thank you

    • WPBeginner Support says

      It would depend on what is creating the account, if you reach out to the support for the plugin you are using they should be able to let you know.

      Administrador

  13. Alex Hoyle says

    Hello. I just made a WordPress website for my blog. How do I change the permalink to use the primary domain instead of starting with the temp.domain?

    • WPBeginner Support says

      You would want to check under Settings>General to see what your domain is set as, if it is on your temporary domain there then normally you can reach out to your hosting provider to help you update from your temporary domain to the correct address without issue :)

      Administrador

  14. The Thus says

    Hello WPBeginner,
    I have configured and setup as you have shown in article but still my articles are ranking in Google domain.com/category ,may I know how to solve this issue ??

    • WPBeginner Support says

      Google may have cached the old structure if you changed it. You could use Google’s URL removal tool if you wanted to remove those results in Google search.

      Administrador

  15. Geet says

    I want to structure my new website like this –

    my-company.com/main-page
    my-company.com/main-page/supporting-article-1
    my-company.com/main-page/supporting-article-2
    my-company.com/main-page/supporting-article-3

    Is it possible to create this structure using Custom Permalinks plugin?

    • WPBeginner Support says

      The plugin should allow you to change the permalink to anything so it should be able to set up that permalink structure.

      Administrador

  16. Mike Coleman says

    I have a new website (unpublished as yet) and want to have a home page. However, when I attempt to create a page with just that URL Permalinks adds an unfathomable number to the URL eg – example.com.au/123-2.
    I’ve tried altering the Permalink settings but that alters the code after the / to whatever the settings dictate.
    How do I create a page with just the URL and no / or additions after the /?
    regards
    Mike

    • WPBeginner Support says

      If you want to have a specific page appear when it is just the url without the slashes then you would set the home page under Settings>Reading :)

      Administrador

  17. Geetanjali says

    Hi I have shifted my blog from blogger to wordpress. My permalink set to month and post. But now for new post I want the permalink to be post only. So after reading this aricle I have installed custom permalinks plugin but while editing the new post I don’t see the option to change the month and post from slug. Please suggest what can be done for changing the new post and coming post permalink to post only instead of month and post.

  18. Tucker Daugh says

    I’ve been told by developers to not change permalinks at the “EDIT” level. I have some pages on a site I helped build that really could benefit with a name change. Something that reflects what a person may be searching for vs something we were trying to be clever with. So, question: What causes permalinks to “break” if you change them at that edit stage (When you open a page and see the URL). I would assume if I am careful and do_something_like_this than I’m okay, right?

    • WPBeginner Support says

      Hi Tucker,

      When you change a page’s URL by editing it, your page would work fine on your website. However, your old URL would be indexed by search engines and they will not be able to find it. If you must change the permalink of an existing page, then you need to set up a redirect.

      Administrador

  19. Talkgeria says

    Thanks for sharing this helpful post.

    My problem is that my blog posts shows mysite.com/category instead of mysite.com/postname on search result but shows the post name once you click on it. my question now is, how do i make the post name to appear on search result as well?

  20. Vidya says

    Hi
    i have a page which compares different products. permalink of the same is /page-name/?compareids=1,2,3
    can you please suggest me about how to customize permalink of this kind of pages so to display permalink like : /page-name/compare-productname1-vs.-productname2-vs.-productname3

  21. Prashant Chevale says

    Hello Team,

    I have an query,

    1.How to implement keywords in url before creating post & after creating post?

    2.How to implement keywords in Posts url without creating 404 error in WordPress?

    3. Without creating 404 error how to optimise urls?

    4.I want permalink customise ( insert keyword in url ) without any error how can I set that?

    please help me…

    Thank you.

  22. Orit Adar says

    My entire site is still under maintenance, but most of my posts are defined as “published” in that setup. If I want to change the slugs can I just revert the status to “draft” temporarily, change the slug and then re-“publish”? I guess I do not understand the meaning of the word “publish” as long as the site is not alive, but it helps to see the posts better s I did it. Thank you.

      • Adell says

        My site is new and under construction -not live. I’ve created a couple posts and published them, but my site is not live. Can i keep changing the slug , permalinks, and category tags, without needing the re-direct plug in?

        Is it safe to keep making changes to the permalink as long as my site is not live (even though i clicked ‘publish’?

        Do i only need the redirect plug in if i make changes tot the permalnk after the site goes live?

        thank you!!

  23. Nnamdi says

    I would like to know how to create a page name before the website url example customname.yoursitename.com. i don’t know how else to describe this sorry for any misunderstanding.

  24. Brandy says

    Hi, when a do this process, the /blog does not appears in the breadcumbs. What can I do?

    I want my blog:

    example.com/blog/category/post-1

    and the breadcumbs:

    Home > Blog > Category > Post-1

    How can I add the > Blog to my breadcumbs?

    I guess it does not appear because / blog is artificially configured. Is there any way to make it hierarchical?

  25. Jaymi V says

    My permalink structure is set to post type. After I have published a page & I parent it in order to use the parent’s sidebar menu, once I update the page it adds another link to the url structure — for example, page url originally is: example.com/acctg/new-page
    After I parent it to my accounting landing page & I update the page the url becomes:
    example.com/acctg/accounting/new-page
    If I delete the extra /accounting from the permalink the page will appear as a blank page unless I un-parent it from /accounting landing page & create its own sidebar menu.
    Is there a workaround to this problem?

  26. Francis says

    Please, I added post I’d in my post permalink. But i want to change my permalink structure to /category/post_name but am afraid the old link will be down and this might make me loose my Google ranking.

    I want to change the post ID *956* to category of the post. But how can i redirect the old URL to the new one after the changes is done? Please help me.

  27. Hassanein says

    Hi, thanks for the Useful article, I have a question, in my WordPress blog when I press on the post title it gives me the correct permalink (Post name only), but when I press on the (continue reading ) it gives the same permalink but with some extra codes! How can I make it similar without more extension! Only the post name without any additions ?

  28. Valente says

    Hello, I already have a worpress website and I am using a theme with home,page, about us etc. I added woocommerce where woocommerce has its own permalinks structure,My WP permalinks are set for static page %post%
    the woocommerce shop it is not the home page …
    Should I leave the wp permalinks as it is ? And how should i have to set the woocoommerce permalinks and reading?

  29. AmeerTarin says

    Good evening,
    I have a website up and running for several years. Now I want to use the WordPress generated permalink for my page to publish article(s). I have .htacess & index.php in place. Now the question? How do I use my custom permalink for new page? Do I copy the link & paste it in the address bar. Or how does it work? I am stuck at this last bit. Please help. Many thanks
    Ameer

  30. Donna says

    Without the plugin, the slug always has a “-2” at the end, as if it were a copy. But with the plugin.it will not has a “-2”. How can I do

    • WPBeginner Support says

      Hi Dor,

      If you have published the homepage, then it will not affect the URL. However, if the page is still saved as a draft and has never been published, then changing the title will change the URL slug. However, you can click on the URL slug on the page edit screen and change it back.

      Administrador

  31. Hannen says

    I want to get get rid of the permalink altogether. I don’t want the titles to have a link. Is there a way to do that?
    Thank you :)

  32. Sue Jonas says

    I have a newly built site and all the permalink options look like this: example.com/wordpress/xyz options
    I can’t find a one without ‘wordpress’ in the middle. Have I done something wrong? How can I fix this? Thank you

  33. Jean-Francois Mayer says

    Thank you. This is indeed a good description. However, there is one aspect that you do not mention: what happens to the customized slugs in case the permalink structure changes.

    I am currently moving a website in French to WP. When titles are too long, or include apostrophes (that result into making two words into one, when slugs get automatically created), I have shortened them.

    After a number of my customized permalinks had been created, I decided that I preferred the permalinks to follow a structure on the pattern year-month-day, i.e…./2016/08/15/… instead of …/2016/08/…

    Easily done… but all my customizations were gone!

    I will recreate them. But then, how to make sure that my customized permalinks will stick, even if I would decide to change again the permalink structure before the site goes live?

    There should be a way, or a plugin – but I have not yet found it.

    • WPBeginner Support says

      Slugs are not supposed to be changed when you update permalink structure. They are stored in the database and will be used again when you use a Permalink structure that uses post-name in the URL instead of ID.

      Administrador

      • Jean-Francois Mayer says

        Thank you very much for your reply.

        Yes, I expected indeed custom slugs not to change when I updated the permalink structure… but they did, for reasons beyond my understanding, and I do not dare to test that a second time. It may have to do with the fact that a number of posts were imported from another CMS in an automated way, which resulted in numeric slugs, that we managed to regenerate (using Permalink Manager) in order to bring them to standard slugs. Maybe this had unexpected consequences when changes in settings were made at a later stage.

        Anyway, good to know this is not a frequent behavior, and probably caused by something else. But I will be extremely careful in the future with any change in the permalink structure!

  34. Logen says

    The recent low ratings, inactive support forums and lack of response from author is making me hesitant to use Custom Permalinks. Anyone has any issues with it, considering last plugin update was 7 months ago?

  35. Stefano says

    Really interesting. Many thanks for the good stuff. I’ll give a try for sure as I have to manage categories, sub-categories and a lot of tags.

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.